/* ============================================================================
   Storyflux World (getstoryflux.com/world): the character directory and a
   character's page with its chat. Built on styles.css + library.css.
   ========================================================================== */

/* ---------- directory ---------- */
.wd-kicker { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.wd-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.wd-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--mist); font: inherit; font-size: var(--step--1); cursor: pointer; }
.wd-chip:hover { color: var(--text); }
.wd-chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(253, 184, 19, 0.1); }
.wd-row { margin-top: clamp(28px, 5vw, 44px); }
.wd-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; }
.wd-row-head h2 { font-size: var(--step-2); }
.wd-row-head span { color: var(--mist); font-size: var(--step--1); }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 262px), 1fr)); gap: 24px; margin-top: 18px; padding: 6px 4px 10px; }
/* a character's card, like a film poster (the portrait, name and story over its foot); it drifts gently (after R3mus) */
.wcard { --grow: 1; position: relative; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--night-lift); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 0.25s, box-shadow 0.3s; animation: wfloat 7s ease-in-out infinite; animation-delay: var(--d, 0s); will-change: transform; }
.wcard::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.14) 48%, transparent 66%); transform: translateX(-120%); }
.wcard:hover, .wcard:focus-visible { --grow: 1.03; border-color: #6a5590; box-shadow: 0 14px 40px -12px rgba(160, 114, 254, 0.55), 0 0 0 1px rgba(160, 114, 254, 0.25); }
.wcard:hover::after { transform: translateX(120%); transition: transform 0.8s var(--ease-out); }
/* the glow by their part in the story: protagonists blue, antagonists red, everyone else purple */
.wcard.protagonist:hover, .wcard.protagonist:focus-visible { border-color: #3f6fae; box-shadow: 0 14px 40px -12px rgba(80, 160, 255, 0.6), 0 0 0 1px rgba(80, 160, 255, 0.3); }
.wcard.antagonist:hover, .wcard.antagonist:focus-visible { border-color: #9a3b4b; box-shadow: 0 14px 40px -12px rgba(255, 70, 90, 0.55), 0 0 0 1px rgba(255, 70, 90, 0.3); }
@keyframes wfloat {
  0%, 100% { transform: scale(var(--grow)) translate(0, 0); }
  25% { transform: scale(var(--grow)) translate(-2px, -4px); }
  50% { transform: scale(var(--grow)) translate(2px, -2px); }
  75% { transform: scale(var(--grow)) translate(-1px, -3px); }
}
.wcard-pic { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: linear-gradient(160deg, #2a1f3d, #1e1830); display: flex; align-items: center; justify-content: center; }
.wcard-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease-out); }
.wcard:hover .wcard-pic img { transform: scale(1.04); }
.wcard-pic svg { color: var(--mist); opacity: 0.45; margin-bottom: 18%; }
.wcard-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20, 16, 28, 0.6) 70%, rgba(26, 21, 37, 0.98)); }
.wcard-cap { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.wcard-cap strong { font-size: var(--step-1); line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.wcard-from { font-size: var(--step--1); color: #cfc5dc; }
.wcard-from em { color: var(--text); font-style: normal; font-family: var(--script); }
.wcard .wtag { z-index: 2; }
.wcard-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
.wcard-bio { font-size: var(--step--1); line-height: 1.45; color: #d9d0e3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wcard-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: auto; }
.wcard-count { font-size: 0.8rem; color: var(--mist); }
.wcard-talk { font-size: 0.85rem; font-weight: 600; color: var(--gold); }
.wfollow { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.wfollow:hover { border-color: #57486e; }
.wfollow[aria-pressed="true"] { color: var(--gold); border-color: rgba(253, 184, 19, 0.4); }
.wportrait { position: relative; aspect-ratio: 3 / 4; background: var(--night-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wportrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wportrait svg { color: var(--mist); opacity: 0.45; }
.wtag { position: absolute; right: 10px; top: 10px; font-size: 0.72rem; font-weight: 700; background: rgba(20, 16, 28, 0.85); color: var(--gold); padding: 4px 8px; border-radius: 999px; }
.wd-empty { margin-top: 40px; }

/* ---------- a character's page ---------- */
.wc-band { position: relative; height: clamp(150px, 22vw, 230px); margin-inline: calc(50% - 50vw); overflow: hidden; background: #231a2a; border-bottom: 1px solid var(--line); }
.wc-band img { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) saturate(1.1) brightness(0.45); }
.wc-band.clear { height: clamp(180px, 26vw, 300px); }
.wc-band.clear img { inset: 0; width: 100%; height: 100%; object-position: center 20%; filter: brightness(0.8); }
.wc-band.clear::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 16, 28, 0.15) 0%, transparent 35%, rgba(20, 16, 28, 0.55) 75%, var(--night) 100%); }
.wc-layout { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 32px); align-items: flex-start; padding-bottom: 64px; }
/* the profile: a poster card (the portrait with the name over its foot), then the bio and actions */
.wc-profile { flex: 0 1 320px; min-width: 260px; margin-top: clamp(-130px, -10vw, -80px); position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--night-lift); border: 1px solid var(--line); box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(160, 114, 254, 0.08); }
.wc-pic.wportrait { aspect-ratio: 4 / 5; border-radius: 0; background: linear-gradient(160deg, #2a1f3d, #1e1830); }
.wc-pic.wportrait img { object-position: center 22%; }
.wc-pic.wportrait > svg { margin-bottom: 22%; }
.wc-pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(20, 16, 28, 0.6) 72%, rgba(26, 21, 37, 0.98)); pointer-events: none; }
.wc-pic .wtag { z-index: 2; }
.wc-cap { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; }
.wc-name { font-family: var(--script); font-size: var(--step-3); line-height: 1.1; letter-spacing: -0.015em; margin: 0; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65); }
.wc-from { margin: 6px 0 0; color: #cfc5dc; font-size: var(--step--1); }
.wc-from a { color: var(--gold); text-decoration: none; }
.wc-from a:hover { text-decoration: underline; }
.wc-from em { color: var(--text); font-style: normal; font-family: var(--script); }
.wc-info { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px 20px; }
.wc-info > p { margin: 0; }
.wc-stats { font-size: var(--step--1); color: var(--mist); }
.wc-stats a { color: var(--gold); text-decoration: none; }
.wc-stats a:hover { text-decoration: underline; }
.wc-bio { line-height: 1.55; color: #d9d0e3; }
.wc-acts { display: flex; gap: 10px; }
.wc-acts .btn { flex: 1; justify-content: center; }
.wc-knows { font-size: var(--step--1); color: var(--mist); line-height: 1.5; }
.wc-main { flex: 999 1 380px; min-width: 0; margin-top: 22px; }
.wc-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.wc-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 0 12px; color: var(--mist); font: inherit; font-size: var(--step-0); cursor: pointer; }
.wc-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); font-weight: 600; }
.wc-panel { padding-top: 16px; }
.wc-note { padding: 16px; border-radius: 12px; background: var(--night-lift); border: 1px dashed var(--line); color: var(--mist); font-size: var(--step--1); line-height: 1.5; }
.wc-moments { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wc-moments figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--night-lift); border: 1px solid var(--line); }
.wc-moments img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; cursor: zoom-in; }
.wc-moments figcaption { padding: 8px 10px; font-size: var(--step--1); color: #d9d0e3; }

/* ---------- the chat ---------- */
.wchat { flex: 0 1 380px; min-width: 300px; margin-top: 22px; height: min(680px, 78vh); display: flex; flex-direction: column; border-radius: 16px; background: var(--night-lift); border: 1px solid var(--line); overflow: hidden; position: sticky; top: 16px; }
.wchat[hidden] { display: none; }
.wchat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.wchat-head .dot { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--night-2); flex-shrink: 0; }
.wchat-head .dot img { width: 100%; height: 100%; object-fit: cover; }
.wchat-head strong { display: block; }
.wchat-head small { display: block; color: var(--mist); font-size: 0.78rem; line-height: 1.3; }
.wchat-x { margin-left: auto; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--mist); cursor: pointer; font-size: 20px; line-height: 1; }
.wchat-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.wchat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.wchat-intro { margin: 0 auto 4px; max-width: 300px; text-align: center; font-size: 0.78rem; color: var(--mist); line-height: 1.45; }
.wchat-preview { margin: 0 12px; padding: 8px 10px; border-radius: 10px; background: rgba(160, 114, 254, 0.12); color: #d6c5ff; font-size: 0.8rem; line-height: 1.4; }
.wmsg { max-width: 86%; padding: 9px 12px; border-radius: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.wmsg.reader { align-self: flex-end; background: rgba(253, 184, 19, 0.16); border-bottom-right-radius: 4px; }
.wmsg.character { align-self: flex-start; background: #241b33; border-bottom-left-radius: 4px; }
.wmsg.typing { color: var(--mist); display: inline-flex; align-items: center; gap: 10px; animation: wdots-in 0.28s cubic-bezier(0.7, 0.2, 0.29, 0.98) both; }
.wmsg.reader.typing { flex-direction: row-reverse; }
.wdots { display: inline-flex; align-items: center; gap: 5px; height: 14px; }
.wdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold, #fdb813); box-shadow: 0 0 0 rgba(253, 184, 19, 0); animation: wdots-bob 1.2s ease-in-out infinite both; }
.wdots i:nth-child(2) { animation-delay: 0.15s; }
.wdots i:nth-child(3) { animation-delay: 0.3s; }
.wmsg.reader .wdots i { background: var(--text, #fff); }
.wdots-label { font-size: 0.86rem; }
.wdots-label::after { content: "…"; }
@keyframes wdots-bob {
  0%, 70%, 100% { transform: translateY(0) scale(0.8); opacity: 0.45; box-shadow: 0 0 0 rgba(253, 184, 19, 0); }
  35% { transform: translateY(-5px) scale(1.1); opacity: 1; box-shadow: 0 0 10px rgba(253, 184, 19, 0.55); }
}
@keyframes wdots-in { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wdots i { animation: none; opacity: 0.8; } .wmsg.typing { animation: none; } }
.wmsg em { color: var(--mist); }
.wchat-err { margin: 0 12px; color: #ffb4b4; font-size: 0.82rem; }
.wchat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.wchat-form input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--night); color: var(--text); font: inherit; font-size: 0.95rem; padding: 0 12px; }
.wchat-form input:focus { outline: 2px solid rgba(253, 184, 19, 0.5); outline-offset: 1px; }
.wchat-send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--gold); color: #14101c; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wchat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.wchat-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 0 12px 10px; }
.wchat-foot button { background: none; border: 0; color: var(--mist); font: inherit; font-size: 0.75rem; cursor: pointer; text-decoration: underline; }

.wmsg-acts { align-self: flex-start; display: flex; align-items: center; gap: 6px; margin: -4px 0 0 4px; }
.wmsg-acts .wmsg-report { margin: 0; }
.wplay { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(253, 184, 19, 0.12); color: var(--gold); cursor: pointer; transition: background 0.2s, transform 0.15s; }
.wplay:hover { background: rgba(253, 184, 19, 0.22); }
.wplay:active { transform: scale(0.94); }
.wplay:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wplay-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.wplay-ring circle { fill: none; stroke-width: 2; }
.wplay-track { stroke: rgba(255, 255, 255, 0.12); }
.wplay-done { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.wplay-i { width: 12px; height: 12px; fill: currentColor; display: none; }
.wplay-i.play { margin-left: 2px; }
.wplay.idle .wplay-i.play, .wplay.paused .wplay-i.play { display: block; }
.wplay.playing .wplay-i.pause { display: block; }
.wplay.loading .wplay-i.spin { display: block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: wplay-spin 0.8s linear infinite; }
@keyframes wplay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wplay.loading .wplay-i.spin { animation: none; } .wplay-done { transition: none; } }
.wmsg-report { align-self: flex-start; margin: -6px 0 0 6px; background: none; border: 0; padding: 2px 4px; color: #8c829b; font: inherit; font-size: 0.72rem; cursor: pointer; }
.wmsg-report:hover { color: var(--text); text-decoration: underline; }
.wreport { align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line); background: rgba(255, 255, 255, 0.02); font-size: 0.85rem; }
.wreport select, .wreport input { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--text); font: inherit; font-size: 0.85rem; padding: 0 10px; }
.wreport > div { display: flex; gap: 8px; }
.wreport p { margin: 0; color: #c8f2dc; }
.wchat-gate { margin: 0 12px 12px; padding: 14px; border-radius: 12px; background: rgba(244, 91, 31, 0.1); border: 1px solid rgba(244, 91, 31, 0.35); }
.wchat-gate p { margin: 0 0 10px; font-size: 0.9rem; line-height: 1.45; }
.wchat-gate > div { display: flex; gap: 8px; flex-wrap: wrap; }
.wchat-form[hidden], .wchat-gate[hidden] { display: none; }

/* phones: the chat takes the whole screen, over the page */
@media (max-width: 760px) {
  .wc-profile { flex-basis: 100%; margin-top: -72px; }
  .wc-pic.wportrait { aspect-ratio: 4 / 3; }
  .wchat { position: fixed; inset: 0; z-index: 50; width: auto; min-width: 0; height: auto; margin: 0; border-radius: 0; border: 0; }
  body.wchat-open { overflow: hidden; }
}

/* ---------- "Meet the characters" on a story page ---------- */
.meet { margin-top: clamp(28px, 5vw, 44px); }
.meet-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.meet-head span { color: var(--mist); font-size: var(--step--1); }
.meet-head a { margin-left: auto; color: var(--gold); font-size: var(--step--1); text-decoration: none; }
.meet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 14px; }
.meet-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--night-lift); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.meet-card:hover { border-color: #57486e; }
.meet-card .dot { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--night-2); flex-shrink: 0; }
.meet-card .dot img { width: 100%; height: 100%; object-fit: cover; }
.meet-card b { display: block; }
.meet-card small { color: var(--mist); font-size: 0.8rem; margin-top: 2px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meet-card .talk { margin-left: auto; padding: 8px 14px; border-radius: 10px; background: var(--gold); color: #14101c; font-weight: 700; font-size: var(--step--1); }

/* ---------- the walls (world-posts.js) ---------- */
.wd-tabs { display: flex; gap: 26px; margin-top: 26px; border-bottom: 1px solid var(--line); }
.wd-tabs a { padding: 0 0 12px; color: var(--mist); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.wd-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
/* pinned under the site header while you scroll */
body.world-pin { overflow-x: clip; }
body.world-pin .top { position: relative; }
.wd-tabs.pinned { position: sticky; top: 0; z-index: 9; padding-top: 14px; margin-top: 12px; background: rgba(20, 16, 28, 0.86); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 0 0 100vmax rgba(20, 16, 28, 0.86); clip-path: inset(0 -100vmax); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wp-wall { max-width: 640px; margin-top: 22px; }
.wp-list { display: flex; flex-direction: column; gap: 14px; }
.wp-load { margin: 16px auto 0; display: block; }
.wp-load[hidden], .wp-thread[hidden] { display: none; }
.wp { padding: 16px; border-radius: 16px; background: var(--night-lift); border: 1px solid var(--line); }
.wp-head { display: flex; align-items: center; gap: 10px; }
.wp-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--night-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: var(--mist); }
.wp-av img { width: 100%; height: 100%; object-fit: cover; }
.wp-name { display: block; font-weight: 700; color: var(--text); text-decoration: none; }
a.wp-name:hover { text-decoration: underline; }
.wp-sub { display: block; font-size: 0.8rem; color: var(--mist); }
.wp-sub a { color: var(--mist); }
.wp-point { margin-left: auto; font-size: 0.72rem; color: var(--mist); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.wp-body { margin: 12px 0 0; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.wp-body em { color: var(--mist); }
.wp-img { margin: 12px 0 0; border-radius: 12px; overflow: hidden; background: var(--night-2); }
.wp-img img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.wp-img figcaption { padding: 8px 10px; font-size: 0.85rem; color: #d9d0e3; }
.wp-video { margin: 12px 0 0; border-radius: 12px; overflow: hidden; background: #000; }
.wp-video video { display: block; width: 100%; max-height: 520px; background: #000; }
.wp-video.tall video { max-height: 640px; }
.wp-excerpt { margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--paper); color: var(--ink); font-family: var(--script); font-size: 0.95rem; line-height: 1.5; }
.wp-ex-head { display: block; font-weight: 700; text-transform: uppercase; font-size: 0.82rem; margin-bottom: 8px; }
.wp-excerpt p { margin: 6px 0; }
.wp-ex-d { padding: 0 8%; }
.wp-ex-d b { display: block; text-align: center; font-weight: 400; }
.wp-ex-read { display: inline-block; margin-top: 6px; font-family: var(--sans); font-size: 0.82rem; font-weight: 700; color: #6a0f5a; }
.wp-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; padding: 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--mist); font-size: 0.9rem; }
.wp-acts { display: flex; gap: 6px; margin-top: 12px; }
.wp-act { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--mist); font: inherit; font-size: 0.88rem; cursor: pointer; }
.wp-act:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.wp-act.on { color: #ff6b9a; }
.wp-more { margin-left: auto; font-size: 0.78rem; }
.wp-thread { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.wp-muted { color: var(--mist); font-size: 0.85rem; }
.wp-comments { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.wp-c { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.wp-c.reply { margin-left: 26px; }
.wp-c.as-char { border-left: 2px solid var(--gold); }
.wp-c-head { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--mist); }
.wp-c-head b { color: var(--text); }
.wp-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); }
.wp-c p { margin: 4px 0 0; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.wp-c-acts { display: flex; gap: 10px; margin-top: 4px; }
.wp-c-acts button { background: none; border: 0; padding: 0; color: #8c829b; font: inherit; font-size: 0.75rem; cursor: pointer; }
.wp-c-acts button:hover { color: var(--text); }
.wp-compose { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.wp-compose textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--text); font: inherit; font-size: 0.92rem; padding: 8px 10px; resize: vertical; }
.wp-compose-row { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.wp-as { margin-right: auto; font-size: 0.82rem; color: var(--mist); display: flex; align-items: center; gap: 6px; }
.wp-adult { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: 12px; background: rgba(244, 91, 31, 0.08); border: 1px solid rgba(244, 91, 31, 0.3); color: #f3d6c8; font-size: 0.9rem; }
.wp-empty { margin: 8px 0 0; max-width: none; }
.wp-empty .btn { margin-top: 4px; }
.wp-audio { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(160, 114, 254, 0.08); border: 1px solid rgba(160, 114, 254, 0.25); }
.wp-audio-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.wp-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: #14101c; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wp-audio-label { display: block; font-size: 0.85rem; color: #d9d0e3; margin-bottom: 6px; }
.wp-bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.wp-bar-fill { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s linear; }
.wp-time { font-size: 0.8rem; color: var(--mist); font-variant-numeric: tabular-nums; }
.wp-audio-lines { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(160, 114, 254, 0.2); font-size: 0.9rem; line-height: 1.5; color: #e9e2f2; }
.wp-audio-lines p { margin: 4px 0; }
.wp-audio-lines p.a { color: var(--mist); font-style: italic; }


/* ============================================================================
   World's look: grid walls whose posts rise in and open into the full post.
   (After R3mus.)
   ========================================================================== */
/* grid walls */
.wp-wall.wide { max-width: none; }
.wp-grid { display: flex; gap: 16px; align-items: flex-start; }
.wp-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.wp-top:empty { display: none; }
.wp-top { margin-bottom: 14px; }
.wp.tile { cursor: pointer; transition: transform 0.25s var(--ease-out), box-shadow 0.3s, border-color 0.25s; }
.wp.tile:hover, .wp.tile:focus-visible { transform: translateY(-3px); border-color: #57486e; box-shadow: 0 16px 36px -14px rgba(160, 114, 254, 0.5), 0 2px 10px -4px rgba(100, 200, 255, 0.25); }
.wp.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wp.tile .wp-body { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.wp.tile .wp-img img { max-height: 420px; }
.wp.tile.locked { cursor: default; }
.wp.rise { animation: wp-rise 0.55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes wp-rise { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: none; } }
.wp.wp-away { visibility: hidden; }
.wp-loader { position: relative; height: 70px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.wp-loader[hidden] { display: none; }
.wp-loader::before { content: ""; width: 80px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #ff007f, #8b5cf6, #00c3ff); animation: wp-shimmer 1.2s infinite linear; }
@keyframes wp-shimmer { from { transform: translateX(-80px); } to { transform: translateX(80px); } }

/* the full post, grown out of its tile */
.wp-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 4vh, 40px) 16px; }
.wp-modal-bg { position: absolute; inset: 0; background: rgba(10, 7, 16, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wp-modal-box { position: relative; width: min(680px, 100%); max-height: 100%; overflow-y: auto; border-radius: 18px; background: #1d1729; border: 1px solid #3a2f50; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(160, 114, 254, 0.12); scrollbar-width: thin; }
.wp-modal-box .wp.full { border: 0; background: transparent; padding: 22px 22px 18px; }
.wp-modal-box .wp.full .wp-head { padding-right: 44px; }
.wp-modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.wp-modal-x:hover { background: rgba(255, 255, 255, 0.12); }
.wp-modal-x:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wp-ghost { position: fixed; z-index: 1; overflow: hidden; border-radius: 18px; background: #1d1729; border: 1px solid #3a2f50; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9); pointer-events: none; }
.wp-ghost > .wp { margin: 0; border: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.wp-modal-open { overflow: hidden; }
@media (max-width: 640px) {
  .wp-modal { padding: 0; align-items: stretch; }
  .wp-modal-box { width: 100%; max-height: none; border-radius: 0; border: 0; }
  .wp-modal-box .wp.full { padding: 18px 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .wcard, .wp.rise, .wp-loader::before { animation: none; }
  .wcard:hover::after { transition: none; }
  .wp.tile:hover { transform: none; }
}

/* ---- skeletons while World loads (shaped like what's coming) ---- */
.sk u.sk-pic, .sk u.sk-av, .sk u.sk-img, .sk u.sk-pill, .sk u.sk-band, .sk-tabs u { display: block; }
.sk-world { padding-block: clamp(16px, 3vw, 36px) 40px; }
.sk-tabs { display: flex; gap: 26px; margin-top: 30px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sk-tabs u { width: 84px; height: 16px; border-radius: 6px; }
.sk-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 262px), 1fr)); gap: 24px; margin-top: 30px; }
.sk-poster { border-radius: 18px; overflow: hidden; background: var(--night-lift); border: 1px solid var(--line); padding-bottom: 18px; }
.sk-poster u.sk-pic { aspect-ratio: 4 / 5; border-radius: 0; }
.sk-poster i { margin: 12px 16px 0; }
.sk-poster u.sk-pill { width: 92px; height: 34px; border-radius: 999px; margin: 16px 16px 0; }
.sk-tile { padding: 16px; border-radius: 16px; background: var(--night-lift); border: 1px solid var(--line); }
.sk-who { display: flex; gap: 10px; align-items: center; }
.sk-who > div { flex: 1; }
.sk u.sk-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.sk u.sk-av.small { width: 30px; height: 30px; }
.sk-tile > i { margin-top: 14px; }
.sk u.sk-img { height: 200px; margin-top: 14px; border-radius: 12px; }
.sk-wall { display: flex; flex-direction: column; gap: 16px; }
.sk-wall.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.sk-comments { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
.sk-comments .sk-who i:last-child { margin-top: 8px; }
.sk-char u.sk-back { width: 90px; height: 36px; border-radius: 999px; margin-top: clamp(16px, 3vw, 28px); }
.sk-char u.sk-band { height: clamp(150px, 22vw, 230px); margin: 0 calc(50% - 50vw); border-radius: 0; }
.sk-clayout { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 32px); align-items: flex-start; }
.sk-cprof { flex: 0 1 320px; min-width: 260px; margin-top: clamp(-130px, -10vw, -80px); position: relative; border-radius: 20px; }
.sk-cprof .sk-btns { margin: 16px 16px 0; }
.sk-cprof .sk-btns u { flex: 1; width: auto; height: 42px; }
.sk-cmain { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.sk-cmain .sk-tabs { margin-top: 0; }
@media (max-width: 760px) {
  .sk-cprof { flex-basis: 100%; margin-top: -72px; }
  .sk-cprof u.sk-pic { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .sk i, .sk b, .sk u { animation: none !important; }
}

/* ---- a character's page, at the foot: make your own (after R3mus's "Build your AI Clone") ---- */
.wc-invite { --k: 1; max-width: 720px; margin: clamp(24px, 6vw, 64px) auto clamp(56px, 9vw, 110px); padding-inline: 16px; text-align: center; }
.wc-invite h2 { font-family: var(--script); font-size: var(--step-3); letter-spacing: -0.015em; margin: 0 0 10px; }
.wc-invite p { max-width: 54ch; margin: 0 auto 26px; color: var(--mist); line-height: 1.55; }
.wc-orbs { position: relative; height: calc(250px * var(--k)); max-width: 560px; margin: 0 auto 28px; }
.wc-orb { position: absolute; display: block; width: calc(var(--s) * var(--k)); height: calc(var(--s) * var(--k)); border-radius: 50%; opacity: 0; transform: scale(0); text-decoration: none; }
.wc-orb.o1 { --s: 96px; left: 4%; top: 34%; }
.wc-orb.o2 { --s: 128px; left: 27%; top: 4%; }
.wc-orb.o3 { --s: 110px; left: 56%; top: 38%; }
.wc-orb.o4 { --s: 84px; left: 80%; top: 10%; }
.wc-orb-in { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--night-2); border: 3px solid #2e2442; box-shadow: 0 8px 22px -6px rgba(160, 114, 254, 0.5); transition: border-color 0.25s, box-shadow 0.3s; }
.wc-orb-in img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.3s; }
.wc-orb:hover .wc-orb-in, .wc-orb:focus-visible .wc-orb-in { border-color: rgba(160, 114, 254, 0.85); box-shadow: 0 10px 30px -6px rgba(160, 114, 254, 0.75); }
.wc-orb:hover img { filter: brightness(1.08); }
.wc-orb:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.wc-orb.yours .wc-orb-in { display: flex; align-items: center; justify-content: center; background: rgba(160, 114, 254, 0.06); border: 2px dashed rgba(160, 114, 254, 0.45); box-shadow: none; color: #b9a3e8; font-size: calc(30px * var(--k)); font-weight: 300; line-height: 1; }
.wc-orb.yours:hover .wc-orb-in { border-color: var(--gold); color: var(--gold); background: rgba(255, 179, 71, 0.06); }
.wc-orbit { position: absolute; inset: -16px; pointer-events: none; }
.wc-orbit svg { position: absolute; top: 0; left: 50%; width: 16px; height: 16px; margin-left: -8px; fill: none; stroke: #a072fe; stroke-width: 1.8; opacity: 0.75; }
.wc-orb.o2 .wc-orbit svg, .wc-orb.o4 .wc-orbit svg { stroke: #64c8ff; }
.wc-invite.in .wc-orb { animation: wc-orb-pop 0.9s var(--ease-out) forwards; animation-delay: var(--delay); }
.wc-invite.in .wc-orb-in { animation: wc-orb-float 5s ease-in-out infinite; animation-delay: calc(var(--delay) + 0.9s); }
.wc-invite.in .wc-orb.o2 .wc-orb-in { animation-name: wc-orb-float2; }
.wc-invite.in .wc-orb.o4 .wc-orb-in { animation-name: wc-orb-float2; animation-duration: 6s; }
.wc-invite.in .wc-orbit { animation: wc-orbit 9s linear infinite; animation-delay: var(--delay); }
.wc-invite.in .wc-orb.o2 .wc-orbit, .wc-invite.in .wc-orb.o4 .wc-orbit { animation-duration: 12s; animation-direction: reverse; }
@keyframes wc-orb-pop { 0% { opacity: 0; transform: scale(0); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes wc-orb-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(5px, -7px); } }
@keyframes wc-orb-float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-5px, -6px); } }
@keyframes wc-orbit { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .wc-invite { --k: 0.7; } .wc-orb.o4 { left: 76%; } }
@media (prefers-reduced-motion: reduce) {
  .wc-orb, .wc-invite.in .wc-orb { opacity: 1; transform: none; animation: none; }
  .wc-invite.in .wc-orb-in, .wc-invite.in .wc-orbit { animation: none; }
  .wc-orbit { display: none; }
}

/* room between the World tabs' content and the footer line */
#world { padding-bottom: clamp(56px, 8vw, 96px); }

/* ---- full screen for pictures and videos ---- */
.wp-img, .wp-video { position: relative; }
.wp-full { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(10, 7, 16, 0.6); color: #fff; cursor: pointer; opacity: 0; transition: opacity 0.2s, background 0.2s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wp-img:hover .wp-full, .wp-video:hover .wp-full, .wp-full:focus-visible { opacity: 1; }
.wp-full:hover { background: rgba(10, 7, 16, 0.85); }
.wp-full:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: none) { .wp-full { opacity: 1; } }
.wp-video .wp-full { top: 10px; }
.wp-img img.zoomable { cursor: zoom-in; }
.wp-lb { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: #000; cursor: zoom-out; }
.wp-lb img { max-width: 100%; max-height: calc(100% - 48px); object-fit: contain; cursor: default; }
.wp-lb-cap { margin: 0; color: #d9d0e3; font-size: 0.92rem; text-align: center; }
.wp-lb-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.wp-lb-x:hover { background: rgba(255, 255, 255, 0.2); }
.wp-lb-x:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Characters tab, at the foot: write your own story (floating book covers) ---- */
.wd-invite { --k: 1; max-width: 760px; margin: clamp(40px, 7vw, 80px) auto 0; padding-inline: 16px; text-align: center; }
.wd-invite h2 { font-family: var(--script); font-size: var(--step-3); letter-spacing: -0.015em; margin: 0 0 10px; }
.wd-invite p { max-width: 56ch; margin: 0 auto 26px; color: var(--mist); line-height: 1.55; }
.wd-books { position: relative; height: calc(270px * var(--k)); max-width: 600px; margin: 24px auto 30px; }
.wd-book { position: absolute; display: block; width: calc(var(--w) * var(--k)); opacity: 0; transform: scale(0); text-decoration: none; color: inherit; }
.wd-book.b1 { --w: 112px; --tilt: -6deg; left: 4%; top: 22%; }
.wd-book.b2 { --w: 142px; --tilt: 3deg; left: 27%; top: 0; }
.wd-book.b3 { --w: 124px; --tilt: -2deg; left: 55%; top: 14%; }
.wd-book.b4 { --w: 98px; --tilt: 7deg; left: 79%; top: 30%; }
.wd-book-in { display: block; transform: rotate(var(--tilt)); border-radius: 10px; box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06); transition: box-shadow 0.3s, transform 0.3s var(--ease-out); }
.wd-book-in .cover { border-radius: 10px; }
.wd-book:hover .wd-book-in, .wd-book:focus-visible .wd-book-in { transform: rotate(0deg) scale(1.05); box-shadow: 0 22px 44px -14px rgba(253, 184, 19, 0.45), 0 0 0 1px rgba(253, 184, 19, 0.4); }
.wd-book:focus-visible { outline: none; }
.wd-book:focus-visible .wd-book-in { outline: 2px solid var(--gold); outline-offset: 4px; }
.wd-book.yours .wd-book-in { aspect-ratio: 2 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed rgba(253, 184, 19, 0.4); background: rgba(253, 184, 19, 0.04); box-shadow: none; color: rgba(253, 184, 19, 0.8); }
.wd-book-plus { font-size: calc(30px * var(--k)); font-weight: 300; line-height: 1; }
.wd-book-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.wd-invite.in .wd-book { animation: wc-orb-pop 0.9s var(--ease-out) forwards; animation-delay: var(--delay); }
.wd-invite.in .wd-book > .wd-book-in { animation: wd-book-float 6s ease-in-out infinite; animation-delay: calc(var(--delay) + 0.9s); }
.wd-invite.in .wd-book.b2 > .wd-book-in, .wd-invite.in .wd-book.b4 > .wd-book-in { animation-name: wd-book-float2; animation-duration: 7s; }
.wd-book:hover > .wd-book-in { animation-play-state: paused; }
@keyframes wd-book-float { 0%, 100% { transform: rotate(var(--tilt)) translate(0, 0); } 50% { transform: rotate(var(--tilt)) translate(4px, -8px); } }
@keyframes wd-book-float2 { 0%, 100% { transform: rotate(var(--tilt)) translate(0, 0); } 50% { transform: rotate(var(--tilt)) translate(-4px, -6px); } }
@media (max-width: 600px) { .wd-invite { --k: 0.66; } .wd-book.b4 { left: 74%; } }

/* ---- Following tab, at the foot: find more to follow ---- */
.wf-more { margin-top: clamp(40px, 7vw, 72px); padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: var(--night-lift); border: 1px solid var(--line); }
.wf-more-head h2 { font-family: var(--script); font-size: var(--step-2); margin: 0 0 6px; }
.wf-more-head p { margin: 0; color: var(--mist); font-size: var(--step--1); }
.wf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; margin-top: 22px; }
.wf-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; opacity: 0; transform: translateY(16px); }
.wf-more.in .wf-pick { animation: wp-rise 0.55s var(--ease-out) forwards; animation-delay: var(--delay); }
.wf-face { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--night-2); border: 3px solid #2e2442; box-shadow: 0 8px 22px -6px rgba(160, 114, 254, 0.45); transition: border-color 0.25s, box-shadow 0.3s, transform 0.3s var(--ease-out); }
.wf-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-face svg { color: var(--mist); opacity: 0.5; width: 40px; height: 50px; }
.wf-face:hover, .wf-face:focus-visible { border-color: rgba(160, 114, 254, 0.85); transform: translateY(-3px); box-shadow: 0 12px 30px -6px rgba(160, 114, 254, 0.7); }
.wf-face:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wf-name { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; max-width: 100%; }
.wf-name strong { font-size: 0.95rem; }
.wf-name span { font-size: 0.78rem; color: var(--mist); font-family: var(--script); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-name:hover strong { text-decoration: underline; }
.wf-all { display: inline-block; margin-top: 22px; color: var(--gold); text-decoration: none; font-size: var(--step--1); }
.wf-all:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .wd-book, .wd-invite.in .wd-book { opacity: 1; transform: none; animation: none; }
  .wd-invite.in .wd-book > .wd-book-in { animation: none; }
  .wf-pick, .wf-more.in .wf-pick { opacity: 1; transform: none; animation: none; }
}

/* ---- talk out loud (the mic in the chat) ---- */
.wchat-mic { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--mist); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.wchat-mic:hover { color: var(--text); border-color: #57486e; }
.wchat-mic:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wchat-mic.on { background: #e5484d; border-color: #e5484d; color: #fff; animation: wchat-mic-pulse 1.4s ease-out infinite; }
.wchat-mic:disabled { opacity: 0.5; cursor: default; }
.wchat-mic[hidden] { display: none; }
@keyframes wchat-mic-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55); } 100% { box-shadow: 0 0 0 12px rgba(229, 72, 77, 0); } }
.wchat-rec { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 6px 0 12px; height: 42px; border-radius: 999px; background: rgba(229, 72, 77, 0.08); border: 1px solid rgba(229, 72, 77, 0.35); color: var(--text); font-size: 0.9rem; }
.wchat-rec[hidden] { display: none; }
.wchat-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; animation: wchat-blink 1s steps(2) infinite; }
@keyframes wchat-blink { 50% { opacity: 0.25; } }
.wchat-clock { font-variant-numeric: tabular-nums; }
.wchat-rec-hint { margin-left: auto; color: var(--mist); font-size: 0.78rem; white-space: nowrap; }
.wchat-foot button.wchat-hands { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.wchat-hands::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background 0.2s, box-shadow 0.2s; }
.wchat-hands[aria-pressed="true"]::before { background: var(--gold, #fdb813); box-shadow: 0 0 6px rgba(253, 184, 19, 0.6); }
.wchat-rec { container-type: inline-size; }
@container (max-width: 300px) { .wchat-rec-hint { display: none; } }
.wchat-rec-x { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--mist); font-size: 20px; line-height: 1; cursor: pointer; }
.wchat-rec-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
@media (max-width: 420px) { .wchat-rec-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .wchat-mic.on, .wchat-rec-dot { animation: none; } }

/* ---------- World → Chats: every character you've talked with (world.js chatsView) ---------- */
.wcx { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 0; margin: 20px 0 48px; height: var(--wcx-h, calc(100vh - 200px)); min-height: 440px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--night-lift); }
.wcx-list { display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; min-width: 0; border-right: 1px solid var(--line); background: var(--night-deep); }
.wcx-search { display: block; flex: 0 0 auto; margin: 12px; }
.wcx-search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.9rem; }
.wcx-search input::placeholder { color: #8c829b; }
.wcx-search input:focus { outline: none; border-color: #6c5a86; box-shadow: 0 0 0 3px rgba(160, 114, 254, 0.12); }
.wcx-search svg { left: 14px; width: 16px; height: 16px; }
.lib-hero.compact { padding-block: clamp(24px, 4vw, 44px) 4px; }
.lib-hero.compact h1 { font-size: var(--step-3); }
.wcx-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 6px 10px; scrollbar-width: thin; }
.wcx-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background 0.15s; }
.wcx-row:hover { background: rgba(255, 255, 255, 0.04); }
.wcx-row[aria-current="true"] { background: rgba(160, 114, 254, 0.14); }
.wcx-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.wcx-av { position: relative; flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--night-2); box-shadow: 0 0 0 2px rgba(160, 114, 254, 0.55); }
.wcx-av.protagonist { box-shadow: 0 0 0 2px rgba(80, 160, 255, 0.7); }
.wcx-av.antagonist { box-shadow: 0 0 0 2px rgba(255, 70, 90, 0.65); }
.wcx-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.wcx-av svg { width: 26px; height: 32px; color: var(--mist); opacity: 0.5; }
.wcx-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wcx-top { display: flex; align-items: baseline; gap: 8px; }
.wcx-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcx-top time { flex-shrink: 0; color: var(--mist); font-size: 0.75rem; }
.wcx-from { color: var(--mist); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcx-last { color: #d9d0e6; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcx-row.gone { opacity: 0.55; }
.wcx-row.gone .wcx-av { box-shadow: 0 0 0 2px var(--line); }
.wcx-none { padding: 12px; color: var(--mist); font-size: 0.9rem; }
.wcx-pane { display: flex; min-width: 0; min-height: 0; }
.wcx-hint { flex: 1; display: grid; place-items: center; padding: 24px; color: var(--mist); text-align: center; }
.wchat.docked { flex: 1; min-width: 0; margin: 0; height: auto; position: static; border: 0; border-radius: 0; background: transparent; }
.wchat-who { color: inherit; text-decoration: none; }
.wchat-who:hover strong { text-decoration: underline; }
.wchat-focus { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--mist); cursor: pointer; }
.wchat-focus:hover, .wchat-focus[aria-pressed="true"] { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.wchat-focus:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wchat-focus + .wchat-x { margin-left: 0; }
/* focus mode: the chats fill the window */
body.wcx-focus .top, body.wcx-focus .foot, body.wcx-focus .wd-tabs { display: none; }
body.wcx-focus { overflow: hidden; }
body.wcx-focus .wcx { position: fixed; inset: 0; z-index: 60; height: auto; margin: 0; border: 0; border-radius: 0; }
.wchat-closed { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--mist); font-size: 0.88rem; line-height: 1.45; text-align: center; }
.sk-wcx .wcx-list { padding-top: 12px; }
.sk-wcx u.sk-srch { display: block; height: 42px; margin: 0 12px 12px; border-radius: 999px; }
.sk-wcx .sk-row { display: flex; gap: 12px; align-items: center; height: 90px; box-sizing: border-box; margin: 0 6px; padding: 0 10px; }
.sk-wcx .sk-row > div { flex: 1; }
.sk-wcx .sk-row i { margin-top: 0; height: 11px; }
.sk-wcx .sk-row i + i { margin-top: 8px; }
.sk-wcx u.sk-av { width: 44px; height: 44px; }
.sk-wcx u.sk-av.small { width: 32px; height: 32px; }
.sk-wcx .wcx-pane { flex-direction: column; }
.sk-wcx .sk-head { display: flex; align-items: center; gap: 12px; height: 68px; box-sizing: border-box; padding: 0 16px; border-bottom: 1px solid var(--line); }
.sk-wcx .sk-head > div { flex: 1; }
.sk-wcx .sk-head i { margin-top: 0; }
.sk-wcx .sk-head i + i { margin-top: 8px; height: 10px; }
.sk-bubbles { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; }
.sk-bubbles u { height: 44px; border-radius: 16px; }
.sk-bubbles u.me { align-self: flex-end; }
.sk-form { height: 65px; box-sizing: border-box; padding: 12px 16px; border-top: 1px solid var(--line); }
.sk-form u { height: 40px; border-radius: 999px; }
.sk-wcx .wcx-side i { margin-top: 0; }
.sk-wcx u.sk-orb { width: 150px; height: 150px; border-radius: 50%; margin-bottom: 8px; }
.sk-wcx .wcx-side .sk-btns { display: flex; gap: 8px; margin-top: 4px; }
.sk-wcx .wcx-side .sk-btns u { width: 90px; height: 34px; border-radius: 999px; }
@media (max-width: 760px) {
  .lib-hero.compact > p:not(.wd-kicker) { display: none; }
  .wd-tabs { gap: 20px; overflow-x: auto; scrollbar-width: none; }
  .wcx { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; border: 0; border-radius: 0; background: transparent; margin: 20px 0 48px; }
  .wcx-list { border: 0; background: transparent; }
  .wcx-search { margin: 0 0 10px; }
  .wcx-rows { padding: 0; overflow: visible; }
  .wcx-pane { display: none; }
  .wchat-focus { display: none; }
  .wcx.open .wcx-pane { display: flex; position: fixed; inset: 0; z-index: 50; background: var(--night-lift); }
}


/* ---------- a writer's profile: their characters in World (writer.js) ---------- */
@media (max-width: 600px) {
  .writer-cast { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-inline: 0; }
  .writer-cast .wcard-bio { display: none; }
  .writer-cast .wcard-cap strong { font-size: 0.95rem; }
  .writer-cast .wcard-body { padding: 10px 12px 12px; }
}

/* ---------- the storm orb (world-orb.js) ---------- */
.orb { position: relative; width: var(--orb); height: var(--orb); flex-shrink: 0; border-radius: 50%; }
.orb canvas { position: relative; z-index: 1; width: 100%; height: 100%; display: block; border-radius: 50%; }
/* a soft halo in the mode's colour (R3mus glow) */
.orb::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; filter: blur(12px); opacity: 0.55; transition: opacity 0.4s, background 0.4s; background: radial-gradient(circle, rgba(160, 114, 254, 0.35), rgba(90, 60, 255, 0.04)); }
.orb.listening::after { background: radial-gradient(circle, rgba(255, 90, 120, 0.42), rgba(255, 60, 60, 0.08)); animation: orb-listen 1.4s ease-in-out infinite; }
.orb.thinking::after { background: radial-gradient(circle, rgba(80, 230, 210, 0.34), rgba(60, 140, 255, 0.05)); animation: orb-think 3s ease-in-out infinite; }
.orb.speaking::after { background: radial-gradient(circle, rgba(255, 170, 90, 0.42), rgba(180, 80, 255, 0.1)); animation: orb-speak 2s ease-in-out infinite; }
@keyframes orb-listen { 50% { transform: scale(1.08); opacity: 0.9; } }
@keyframes orb-think { 50% { transform: scale(1.05); opacity: 0.85; } }
@keyframes orb-speak { 50% { transform: scale(1.1); opacity: 0.9; } }
/* no WebGL, or reduced motion: a still glowing circle */
.orb:not(.live)::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff 0, #c9a6ff 18%, #6f8dff 45%, #ff64ff 75%, #3a2a5c 100%); transition: background 0.4s; }
.orb.listening:not(.live)::before, .orb.speaking:not(.live)::before { background: radial-gradient(circle at 40% 35%, #fff 0, #ffd750 18%, #ff8a36 45%, #ff588a 75%, #6c2a6a 100%); }
.orb.thinking:not(.live)::before { background: radial-gradient(circle at 40% 35%, #fff 0, #b3ffd9 18%, #33f2d9 45%, #40ccff 75%, #1f4a5c 100%); }
@media (prefers-reduced-motion: reduce) { .orb::after { animation: none !important; } }

/* in a chat: rises above the message box while it listens, thinks or speaks */
.wchat-orb { display: grid; place-items: center; padding: 14px 0 6px; opacity: 0; transform: translateY(10px) scale(0.92); transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wchat-orb.on { opacity: 1; transform: none; }
.wchat-orb[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .wchat-orb { transition: opacity 0.2s; transform: none; } }

/* World → Chats: the column on the right (wide screens) */
.wcx-side { display: none; }
@media (min-width: 1240px) {
  .wcx.has-side { grid-template-columns: minmax(260px, 320px) 1fr 280px; }
  .wcx.has-side .wcx-side { display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 0; overflow-y: auto; padding: 28px 20px; border-left: 1px solid var(--line); background: var(--night-deep); }
}
.wcx-side .orb { margin: 6px 0 4px; }
.wcx-side-state { margin-top: -4px; color: var(--mist); font-size: 0.8rem; min-height: 1.2em; text-align: center; }
.wcx-who { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 100%; }
.wcx-who .wcx-av { width: 64px; height: 64px; }
.wcx-who strong { font-size: 1.05rem; }
.wcx-who small { color: var(--mist); }
.wcx-who-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wcx-shared { width: 100%; }
.wcx-shared h3 { margin: 0 0 10px; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); }
.wcx-who-acts a.wfollow { display: inline-flex; align-items: center; text-decoration: none; }

/* a conversation loading: faint bubbles */
.wchat-sk { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.wchat-sk u { height: 42px; border-radius: 14px; }
.wchat-sk u.character { align-self: flex-start; height: 58px; border-bottom-left-radius: 4px; }
.wchat-sk u.reader { align-self: flex-end; border-bottom-right-radius: 4px; }
.wchat-head.sk u.wchat-sk-dot { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.wchat-loading { pointer-events: none; }

/* ---------- voice mode: the orb fills the screen (world-chat.js) ---------- */
.wchat-vm { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--mist); cursor: pointer; }
.wchat-vm:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.wchat-vm:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wchat-vm + .wchat-focus, .wchat-vm + .wchat-x { margin-left: 0; }
body.wvoice-open { overflow: hidden; }
.wvoice { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 42%, #1d1530 0%, #0d0a14 70%); color: var(--text); animation: wvoice-in 0.35s ease both; }
@keyframes wvoice-in { from { opacity: 0; } }
.wvoice-top { display: flex; align-items: center; gap: 12px; padding: 18px clamp(16px, 4vw, 40px); }
.wvoice-top > div { flex: 1; min-width: 0; display: grid; }
.wvoice-top strong { font-size: 1.1rem; }
.wvoice-top small { color: var(--mist); }
.wvoice-capbtn { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--mist); font: inherit; font-size: 0.82rem; cursor: pointer; }
.wvoice-capbtn[aria-pressed="true"] { color: var(--text); }
.wvoice-x { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--mist); font-size: 26px; line-height: 1; cursor: pointer; }
.wvoice-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.wvoice-mid { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 20px; }
.wvoice-orb { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wvoice-orb:hover { transform: scale(1.02); }
.wvoice-orb:active { transform: scale(0.98); }
.wvoice-orb:focus-visible { outline: 2px solid rgba(253, 184, 19, 0.35); outline-offset: 12px; }
.wvoice[data-mode="listening"] .wvoice-orb { transform: scale(1.04); }
.wvoice-state { margin: 0; color: var(--mist); font-size: 0.95rem; letter-spacing: 0.01em; min-height: 1.4em; text-align: center; }
.wvoice-err { margin: 0; color: #ff9aa8; font-size: 0.9rem; text-align: center; max-width: 520px; }
.wvoice-caps { width: min(720px, 100% - 32px); margin: 0 auto; padding: 0 0 clamp(20px, 5vh, 48px); display: grid; gap: 10px; text-align: center; max-height: 30vh; overflow-y: auto; }
.wvoice-caps[hidden] { display: none; }
.wvoice-caps p { margin: 0; line-height: 1.5; }
.wvoice-you { color: #e8c88a; font-size: 0.92rem; }
.wvoice-you:empty, .wvoice-them:empty { display: none; }
.wvoice-them { font-size: clamp(1rem, 2.2vw, 1.2rem); }
.wvoice-them em { color: var(--mist); }
@media (prefers-reduced-motion: reduce) { .wvoice { animation: none; } .wvoice-orb { transition: none; } }

/* ---------- pictures in a chat (world-chat.js) ---------- */
.wmsg.haspic { padding: 6px 6px 9px; display: flex; flex-direction: column; gap: 8px; }
.wmsg.haspic > span { padding: 0 6px; }
.wpic { display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--night-2); cursor: zoom-in; max-width: 320px; }
.wpic img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.wpic:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wpic.locked { position: relative; cursor: default; width: 260px; aspect-ratio: 4 / 5; }
.wpic.locked img { position: absolute; inset: -8%; width: 116%; height: 116%; max-height: none; filter: blur(14px) saturate(1.2); }
.wpic-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: rgba(13, 10, 20, 0.35); text-align: center; padding: 12px; }
.wpic-lock b { font-size: 0.95rem; }
.wpic-lock b::before { content: "🔒 "; }
.wpic-join { margin-top: 6px; padding: 5px 12px; border-radius: 999px; background: var(--gold, #fdb813); color: #1a1208; font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.wpic-join:hover { filter: brightness(1.08); }
.wchat-up { color: var(--gold, #fdb813); font-weight: 600; white-space: nowrap; }
.wpic-lock small { color: #d9d0e6; font-size: 0.78rem; }
.wpic.gone { cursor: default; padding: 14px; color: var(--mist); font-size: 0.85rem; font-style: italic; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line); }
.wmsg-show { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(253, 184, 19, 0.45); background: rgba(253, 184, 19, 0.1); color: #fde68a; font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.wmsg-show:hover { background: rgba(253, 184, 19, 0.18); }
.wmsg-show-i { display: inline-grid; }
.wchat-pic { flex-shrink: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--mist); cursor: pointer; }
.wchat-pic:hover, .wchat-pic[aria-expanded="true"] { color: var(--text); border-color: #6c5a86; }
.wchat-pic:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wchat-picmenu { margin: 0 12px 8px; padding: 12px; border: 1px solid #3a2f50; border-radius: 14px; background: #1d1729; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8); display: grid; gap: 6px; }
.wchat-picmenu[hidden] { display: none; }
.wchat-picmenu > p { margin: 0 0 2px; color: var(--mist); font-size: 0.8rem; }
.wchat-picmenu > button { text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.wchat-picmenu > button:hover, .wchat-picmenu > button:focus-visible { border-color: #6c5a86; background: rgba(160, 114, 254, 0.1); outline: none; }
.wchat-picask { display: flex; gap: 6px; margin-top: 2px; }
.wchat-picask input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.85rem; }
.wchat-picoffers { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--mist); font-size: 0.75rem; }
.wcx-shared-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wcx-shared-pic { display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--night-2); cursor: zoom-in; position: relative; }
.wcx-shared-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcx-shared-pic.locked { cursor: default; }
.wcx-shared-pic.locked img { filter: blur(8px); transform: scale(1.2); }

/* ---------- character cards: no seam between the portrait and the panel under it ----------
   (the card floats and scales; the photo and the panel were drawn as two layers that could
   land half a pixel apart: now the fade ends in the panel's own colour, a pixel into it) */
.wcard-pic { margin-bottom: -1px; z-index: 0; backface-visibility: hidden; transform: translateZ(0); }
.wcard-pic::after { bottom: -1px; background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--night-lift) 60%, transparent) 70%, var(--night-lift) 99%); }
.wcard-body { position: relative; z-index: 1; background: var(--night-lift); }

/* ---------- tabs switch in place (world.js show()) ---------- */
.wd-hero h1, .wd-hero .wd-hero-sub { transition: opacity 0.17s ease, transform 0.17s ease; }
.wd-hero.swapping h1, .wd-hero.swapping .wd-hero-sub { opacity: 0; transform: translateY(4px); }
body.wd-on-chats .wd-hero { display: none; }
.wd-view.wd-in { animation: wd-in 0.3s ease backwards; }
@keyframes wd-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .wd-hero h1, .wd-hero .wd-hero-sub { transition: none; } .wd-view.wd-in { animation: none; } }

/* ---------- the story badge on a character card, and its story card ---------- */
.wbadge { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 92px); min-height: 40px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(20, 16, 28, 0.72); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.2s, border-color 0.2s, box-shadow 0.25s; }
.wbadge:hover, .wbadge:focus-visible { background: color-mix(in srgb, var(--gold) 16%, rgba(20, 16, 28, 0.8)); border-color: var(--gold); box-shadow: 0 0 18px color-mix(in srgb, var(--gold) 35%, transparent); outline: none; }
.wbadge-cover { flex: none; width: 22px; height: 30px; border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: #2a1f3d; color: var(--gold); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.wbadge-cover img { position: static; width: 100%; height: 100%; object-fit: cover; transform: none !important; }
.wcard-pic .wbadge-cover svg { opacity: 1; margin: 0; color: var(--gold); }
.wbadge-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.wbadge-t small { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.wbadge-t em { font-style: normal; font-family: var(--script); font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wstory { --tip: 26px; position: fixed; z-index: 80; width: 290px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 14px; border-radius: 16px; background: #1f1830; border: 1px solid #4a3c66; box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.75); color: var(--text); display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(-4px); transition: opacity 0.16s, transform 0.2s var(--ease-out); }
.wstory.above { transform: translateY(4px); }
.wstory.in { opacity: 1; transform: none; }
.wstory::before { content: ""; position: absolute; top: -7px; left: var(--tip); width: 12px; height: 12px; background: #1f1830; border-left: 1px solid #4a3c66; border-top: 1px solid #4a3c66; transform: rotate(45deg); }
.wstory.above::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.wstory-top { display: flex; gap: 12px; }
.wstory-cover { flex: none; width: 72px; height: 96px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #2a1f3d; color: var(--gold); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5); }
.wstory-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wstory-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wstory-meta strong { font-family: var(--script); font-size: 1.05rem; line-height: 1.2; }
.wstory-by { font-size: 0.82rem; color: var(--mist); text-decoration: none; }
a.wstory-by:hover { color: var(--text); text-decoration: underline; }
.wstory-genre { align-self: flex-start; margin-top: 2px; font-size: 0.72rem; color: #ddd6fe; background: rgba(160, 114, 254, 0.18); border-radius: 999px; padding: 2px 8px; }
.wstory-log { margin: 0; font-size: 0.85rem; line-height: 1.45; color: #d9d0e3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wstory-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.wstory-cast { display: flex; align-items: center; font-size: 0.75rem; color: var(--mist); }
.wstory-cast img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 2px solid #1f1830; }
.wstory-cast img + img { margin-left: -8px; }
.wstory-cast span { margin-left: 6px; }
.wstory-go { font-size: 0.85rem; font-weight: 700; color: var(--gold); text-decoration: none; white-space: nowrap; }
.wstory-go:hover { color: #ffd56a; }
@media (prefers-reduced-motion: reduce) { .wstory, .wstory.above { transition: none; transform: none; } }

/* ---------- World's skeleton: built from the banner's own boxes, so it takes the banner's space ---------- */
.sk-world { padding-top: 0; }
.sk-ext u.sk-search { display: block; width: 100%; height: 53px; border-radius: 999px; }
.sk-world .sk-tabs { margin-top: 12px; padding-top: 14px; padding-bottom: 19px; }
.sk-world .sk-tabs u { height: 22px; }
.sk-rowhead b { width: 150px; height: 29px; margin: 0; }
.sk-world .sk-posters { margin-top: 17px; padding: 6px 4px 10px; }
.sk-world .sk-poster i { margin-top: 10px; }
.sk-world .sk-poster u.sk-pill { margin-top: 14px; }
@media (max-width: 760px) {
  .sk-wcx .wcx-list { padding-top: 0; }
  .sk-wcx u.sk-srch { margin: 0 0 10px; }
  .sk-wcx .sk-row { margin: 0; }
}

/* the character page's profile card: portrait with the name over its foot, then bio, buttons, follower count, what they know */
.sk-cprof { padding-bottom: 0; }
.sk-cpic { position: relative; }
.sk-ccap { position: absolute; left: 18px; right: 18px; bottom: 14px; }
.sk-ccap b { width: 70%; height: 34px; margin: 0; background: #2f2545; animation: none; }
.sk-ccap i { width: 60%; margin-top: 10px; background: #2f2545; animation: none; }
.sk-cinfo { padding: 14px 18px 28px; }
.sk-cinfo i { margin-top: 9px; }
.sk-cinfo i:first-child { margin-top: 7px; }
.sk-cinfo .sk-btns { margin: 14px 0 0; }
.sk-cinfo .sk-btns u { flex: 1; width: auto; height: 42px; }
.sk-cinfo i.sk-gap { margin-top: 26px; }
.sk-cmain .sk-tabs { padding-bottom: 19px; }
.sk-cmain .sk-tabs u { height: 22px; }
@media (max-width: 760px) { .sk-cinfo i.sk-last { display: none; } }
.sk-char .sk-cmain { padding-top: 22px; }
.wc-pic.wportrait .sf-clip { object-position: center 22%; }
.wcard:hover .wcard-pic .sf-clip { transform: scale(1.04); }
/* the backdrop's clip (character page): over the still, under the fade */
.wc-band-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: brightness(0.8); opacity: 0; transition: opacity 1.2s ease; }
.wc-band.clip-on .wc-band-clip { opacity: 1; }

/* ---------- reactions on posts, and the pop anything new gets ---------- */
.wp-react-wrap { position: relative; display: inline-flex; }
.wp-react { display: inline-flex; align-items: center; gap: 6px; }
.wp-react-face { display: inline-block; font-size: 1rem; line-height: 1; }
.wp-react-tops { font-size: 0.8rem; letter-spacing: -2px; }
.wp-react.on { color: #ff8fb1; }
.wp-react-row { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: #1f1830; border: 1px solid #4a3c66; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.75); opacity: 0; transform: translateY(6px) scale(0.92); transform-origin: 24px 100%; transition: opacity 0.16s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.wp-react-row.in { opacity: 1; transform: none; }
.wp-react-row[hidden] { display: none; }
.wp-react-row button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; font-size: 1.35rem; transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s; }
.wp-react-row button span { display: block; line-height: 1; }
.wp-react-row button:hover, .wp-react-row button:focus-visible { transform: translateY(-4px) scale(1.25); background: rgba(255, 255, 255, 0.06); outline: none; }
.wp-react-row button[aria-pressed="true"] { background: rgba(160, 114, 254, 0.22); }
.wp-react-row.in button { animation: sf-rise 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
.wp-react-row.in button:nth-child(2) { animation-delay: 0.03s; } .wp-react-row.in button:nth-child(3) { animation-delay: 0.06s; }
.wp-react-row.in button:nth-child(4) { animation-delay: 0.09s; } .wp-react-row.in button:nth-child(5) { animation-delay: 0.12s; }
@keyframes sf-rise { from { opacity: 0; transform: translateY(8px) scale(0.6); } }
/* the hop: a quick overshoot and settle, with a soft ring */
.sf-pop { position: relative; animation: sf-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sf-pop::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: sf-ring 0.5s ease-out; pointer-events: none; }
@keyframes sf-pop { 0% { transform: scale(1); } 30% { transform: scale(1.45) translateY(-2px); } 55% { transform: scale(0.9); } 75% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes sf-ring { 0% { opacity: 0.55; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .wp-react-row, .wp-react-row button, .wp-react-row.in button { transition: none; animation: none; } .sf-pop, .sf-pop::after { animation: none; } }

/* ---------- comments: slide up into place (staggered); a new one slides in on its own ---------- */
.wp-c.wp-in { animation: wp-c-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--i, 0) * 0.05s); }
.wp-c.wp-new { animation: wp-c-new 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) backwards; }
@keyframes wp-c-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes wp-c-new { 0% { opacity: 0; transform: translateY(18px) scale(0.97); } 60% { opacity: 1; } 100% { transform: none; } }
.wp-c.wp-new { box-shadow: inset 2px 0 0 var(--gold); }

/* ---------- phones: the comments drawer (after R3mus) ---------- */
.wp-drawer-shade { position: fixed; inset: 0; z-index: 90; background: rgba(8, 6, 12, 0.55); opacity: 0; transition: opacity 0.3s ease; }
.wp-drawer-shade.in { opacity: 1; }
.wp-drawer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; display: flex; flex-direction: column; max-height: 78vh; min-height: 40vh; border-radius: 20px 20px 0 0; background: #1a1525; border-top: 1px solid #3a2f52; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6); transform: translateY(100%); transition: transform 0.41s cubic-bezier(0.7, 0.2, 0.29, 0.98); padding-bottom: env(safe-area-inset-bottom); }
.wp-drawer.in { transform: translateY(0); }
.wp-drawer-head { position: relative; display: flex; align-items: center; justify-content: center; padding: 18px 16px 10px; touch-action: none; cursor: grab; }
.wp-drawer-grip { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(243, 238, 247, 0.25); }
.wp-drawer-head b { font-size: 1rem; }
.wp-drawer-x { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--mist); font-size: 1rem; cursor: pointer; }
.wp-drawer-x:hover, .wp-drawer-x:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.wp-drawer .wp-thread { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 4px 16px 0; border-top: 0; }
.wp-drawer .wp-thread > .wp-compose { position: sticky; bottom: 0; margin: 0 -16px; padding: 10px 16px 14px; background: #1a1525; border-top: 1px solid var(--line); }
body.wp-drawer-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .wp-c.wp-in, .wp-c.wp-new { animation: none; } .wp-drawer, .wp-drawer-shade { transition: none; } }

/* ---------- the card → profile glide (page-to-page view transition; lib-common glideFrom) ---------- */
@view-transition { navigation: auto; }
.sk-cpic .sk-cimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; view-transition-name: wportrait; }
.sk-cpic:has(.sk-cimg) .sk-ccap { display: none; }
::view-transition-group(wportrait) { animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 50; }
::view-transition-old(wportrait), ::view-transition-new(wportrait) { width: 100%; height: 100%; object-fit: cover; overflow: clip; }
::view-transition-old(root) { animation-duration: 0.25s; }
::view-transition-new(root) { animation-duration: 0.35s; animation-delay: 0.08s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
