/* Beastbook: Americana yearbook. Navy bar with a flag-stripe band, white cards with a thin rule (no shadow kit),
   names in marquee type, avatar rings colored by rarity tier, lots on screen. */
.book { --navy: #14284b; --navy-2: #22396a; --line: #d5dde6; --page: #e4edf4; --legend: #d4a017; --epic: #8e44ad; --rare: #2e7dd7; --uncommon: #3f9a4f; --common: #b9c4ce;
  background: var(--page); font-size: .97rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ top bar */
.book-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .8rem; padding: .45rem 1rem; background: var(--navy); color: #fff; }
.book-mark { font: 900 1.95rem/1 var(--sign-font); color: #fff; text-decoration: none; letter-spacing: .02em; }
.book-mark::first-letter { color: #ff5a64; }
.book-tag { font-size: .8rem; background: var(--frame); padding: .15rem .55rem; border-radius: 999px; font-weight: 700; }
.book-tag:empty { display: none; }
.search { flex: 1; max-width: 26rem; position: relative; }
.book-bar #theme { margin-left: auto; }   /* the right-hand group (theme, bell, face, wallet) sits flush right */
.search input { width: 100%; border: 0; border-radius: 999px; padding: .45rem .9rem; font: 500 .95rem var(--ui-font); background: rgba(255, 255, 255, .14); color: #fff; }
.search input::placeholder { color: rgba(255, 255, 255, .7); }
.search input:focus { background: #fff; color: #14284b; outline: none; }
.search input:focus::placeholder { color: #6b7a8c; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + .35rem); z-index: 60; margin: 0; padding: .3rem; list-style: none;
  background: #fff; color: #14284b; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-height: 70vh; overflow-y: auto; }
.search-results[hidden] { display: none; }
.search-results li { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 8px; cursor: pointer; }
.search-results li.on, .search-results li:hover { background: #e8eef5; }
.search-results img, .search-results .sr-ic { width: 2.1rem; height: 2.1rem; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; font-size: 1.15rem; background: #eef3f8; }
.search-results b { display: block; font-size: .92rem; } .search-results small { display: block; color: #5d6b7c; font-size: .76rem; }
.bell { position: relative; border: 0; background: rgba(255, 255, 255, .12); border-radius: 50%; width: 2.3rem; height: 2.3rem; font-size: 1.05rem; cursor: pointer; }
.bell b { position: absolute; top: -.25rem; right: -.25rem; background: var(--frame); color: #fff; font: 800 .7rem/1 var(--ui-font); padding: .2rem .35rem; border-radius: 999px; }
.bell b:empty { display: none; }
.book-who { display: flex; gap: .5rem; align-items: center; font-size: .9rem; white-space: nowrap; }
.book-who button { border: 0; border-radius: 999px; padding: .35rem .9rem; background: #fff; color: var(--navy); font: 700 .9rem var(--ui-font); cursor: pointer; }
.stripes { height: 6px; background: repeating-linear-gradient(90deg, var(--frame) 0 22px, #fff 22px 44px); }

/* ------------------------------------------------------------ layout */
.cols { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr) 21rem; gap: .9rem; max-width: 80rem; margin: 0 auto; padding: .9rem; align-items: start; }
.col-left, .col-right { position: sticky; top: 3.9rem; max-height: calc(100vh - 4.8rem); overflow: auto; scrollbar-width: thin; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .75rem .85rem; margin-bottom: .75rem; }
.box h2 { font: 800 .95rem/1.2 var(--ui-font); margin: 0 0 .5rem; color: var(--navy); }

.nav { list-style: none; margin: 0; padding: 0; }
.nav button { display: flex; gap: .55rem; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: .42rem .5rem; border-radius: 6px;
  font: 650 .97rem var(--ui-font); color: var(--ink); cursor: pointer; }
.nav button:hover { background: #eef3f8; }
.nav button[aria-current="true"] { background: var(--navy); color: #fff; }
.mini { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.mini li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .22rem 0; }
.mini span { color: var(--muted); font-size: .85rem; }
.mini.faces li { justify-content: flex-start; }
.link { color: var(--ink); text-decoration: none; font-weight: 650; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
a.link:hover, .mini a:hover { text-decoration: underline; }
.mini a { color: var(--ink); text-decoration: none; font-weight: 600; }
.tag { color: var(--rare); font-weight: 700; text-decoration: none; }
.tag:hover { text-decoration: underline; }

/* ------------------------------------------------------------ avatars with rarity rings */
.av { width: 2.9rem; height: 2.9rem; border-radius: 50%; object-fit: cover; background: #dfe9ee; display: block; box-shadow: 0 0 0 2.5px var(--ring, var(--common)); }
.av.s { width: 2rem; height: 2rem; box-shadow: 0 0 0 2px var(--ring, var(--common)); }
.av.xs { width: 1.5rem; height: 1.5rem; box-shadow: 0 0 0 1.5px #fff; }
.t-honorary { --ring: #1f9d6b; } .t-founder { --ring: #c9a227; } .t-legendary { --ring: var(--legend); } .t-epic { --ring: var(--epic); } .t-rare { --ring: var(--rare); } .t-uncommon { --ring: var(--uncommon); } .t-common { --ring: var(--common); }

/* ------------------------------------------------------------ stories row */
.stories { display: flex; gap: .7rem; overflow-x: auto; padding: .2rem .1rem .7rem; scrollbar-width: none; }
.stories[hidden] { display: none; }
.story { flex: 0 0 4.6rem; position: relative; text-decoration: none; }
.story img { width: 4.2rem; height: 4.2rem; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ring, var(--frame)); }
.story i { position: absolute; right: .1rem; bottom: .1rem; font-style: normal; font-size: 1rem; line-height: 1;
  background: var(--page, #fff); border-radius: 50%; padding: .15rem; }

/* ------------------------------------------------------------ composer */
.composer-main { display: flex; gap: .65rem; align-items: center; }
.composer-av .av { width: 2.6rem; height: 2.6rem; }
.composer textarea#post-text { resize: none; overflow: hidden; height: 2.6rem; min-height: 2.6rem; max-height: 11rem; line-height: 1.4; padding: .55rem 1rem; border-radius: 1.3rem; }
.composer-row[hidden] { display: none; }
.composer textarea { flex: 1; min-width: 0; width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 18px; padding: .6rem .9rem; font: 1rem/1.4 var(--ui-font); color: var(--ink); background: #f3f6f9; }
.composer-h { display: block; font: 800 .74rem var(--ui-font); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.composer textarea:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(20, 40, 75, .12); }
.composer-row { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: .5rem; }
.post-btn { border: 0; border-radius: 999px; padding: .45rem 1.35rem; background: var(--navy); color: #fff; font: 800 .92rem var(--ui-font); cursor: pointer; }
.post-btn:hover:not(:disabled) { background: var(--navy-2); }
.post-btn:disabled { opacity: .4; cursor: default; }
.book.dark .composer textarea { background: var(--soft); color: var(--ink); }
.book.dark .composer textarea:focus { border-color: #9fc0ef; box-shadow: 0 0 0 3px rgba(159, 192, 239, .18); }
.book.dark .post-btn { background: #2a4a7f; }
.composer-row select { flex: 1; min-width: 0; font: 500 .92rem var(--ui-font); padding: .35rem; border-radius: 6px; border: 1px solid var(--line); }
.count { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.bad { color: var(--frame); font-weight: 700; }
.go.small { display: inline-block; width: auto; margin: 0; padding: .45rem 1.2rem; font-size: .98rem; box-shadow: 0 .2rem 0 #2c3112; }

/* ------------------------------------------------------------ feed */
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .75rem .85rem .55rem; margin-bottom: .7rem; }
.card-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: center; }
.card-who { font-size: .95rem; line-height: 1.3; }
.card-sub { color: var(--muted); font-size: .8rem; }
.news-tag { display: inline-block; font-size: .7rem; font-weight: 800; color: var(--navy); background: #e7eef7; padding: .05rem .4rem; border-radius: 4px; margin-left: .3rem; vertical-align: 1px; }
.card-body { margin: .55rem 0 .2rem; font-size: 1.02rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.pair { display: flex; gap: .5rem; align-items: center; margin: .5rem 0 .2rem; }
.pair img { width: 48%; aspect-ratio: 1.6; object-fit: cover; border-radius: 6px; }
.crowd { display: flex; margin: .5rem 0 .2rem; }
.crowd img { margin-right: -.4rem; }
.rx { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); border-top: 1px solid #edf1f5; margin-top: .45rem; padding-top: .35rem; }
.rx .emo { font-size: .95rem; letter-spacing: -.1em; margin-right: .3rem; }
.rx-btns { display: flex; gap: .3rem; }
.rx-btns button { border: 0; background: none; color: var(--muted); font: 650 .84rem var(--ui-font); cursor: pointer; padding: .25rem .5rem; border-radius: 5px; }
.rx-btns button:hover { background: #f0f4f8; color: var(--ink); }
.rx-btns button[aria-pressed="true"] { color: var(--frame); }
.thread { margin: .5rem 0 0 .6rem; padding-left: .8rem; border-left: 2px solid #e5ecf2; }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.more { display: block; width: 100%; padding: .7rem; border: 1px dashed var(--line); background: #fff; border-radius: 8px; font: 700 .95rem var(--ui-font); color: var(--navy); cursor: pointer; }

/* ------------------------------------------------------------ ranked lists + group pages */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list > li { display: grid; grid-template-columns: 2.2rem 3rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #eef3f6; }
.rank-list .n { font: 900 1.25rem/1 var(--sign-font); color: var(--muted); text-align: right; }
.rank-list .meta { color: var(--muted); font-size: .86rem; }
.rank-list .val { font-weight: 700; white-space: nowrap; }
.mid-h { font: 900 2rem/1 var(--sign-font); margin: .1rem 0 .4rem; color: var(--navy); }
.group-cover { display: grid; grid-template-columns: repeat(6, 1fr); border-radius: 8px 8px 0 0; overflow: hidden; height: 7.5rem; }
.group-cover img { width: 100%; height: 100%; object-fit: cover; }
.group-head { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; padding: .6rem .85rem .7rem; margin-bottom: .75rem; }
.group-head .mid-h { margin: 0; }
.group-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2rem, 1fr)); gap: .6rem; }
.member-grid a { text-align: center; font-size: .8rem; line-height: 1.2; color: var(--ink); text-decoration: none; font-weight: 600; }
.member-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; margin-bottom: .2rem; border: 3px solid var(--ring, var(--common)); }

/* ------------------------------------------------------------ profile card */
.profile { padding: 0; overflow: hidden; }
.cover { height: 6.5rem; background: var(--navy-2) center/cover; filter: saturate(1.15); position: relative; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(20, 40, 75, .55)); }
.cover span { position: absolute; z-index: 1; right: .6rem; bottom: .4rem; color: #fff; font-size: .75rem; font-weight: 700; }
.p-inner { padding: 0 .9rem .8rem; }
.p-avatar { width: 6.4rem; height: 6.4rem; border-radius: 50%; object-fit: cover; margin: -3.4rem 0 .2rem; border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--ring, var(--common)); position: relative; background: #dfe9ee; }
.card-name { font: 900 2rem/1 var(--sign-font); margin: .2rem 0 .3rem; color: var(--navy); }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .55rem; }
.badge { font-size: .74rem; font-weight: 800; padding: .14rem .45rem; border-radius: 4px; background: #eef3f8; color: var(--navy); }
.badge.tier { color: #fff; background: var(--ring); }
.badge.rarebadge { background: #fff4d6; color: #7a5600; }
.badge.rarebadge.one { background: #ffe9a8; color: #6a4a00; font-weight: 700; }
.counts { display: flex; gap: 1.1rem; margin: 0 0 .6rem; font-size: .84rem; color: var(--muted); }
.counts b { display: block; font: 900 1.3rem/1 var(--sign-font); color: var(--ink); }
.rows { list-style: none; margin: 0 0 .6rem; padding: 0; font-size: .9rem; }
.rows li { display: grid; grid-template-columns: 3.3rem minmax(0, 1fr); gap: .4rem; padding: .13rem 0; }
.row-k { color: var(--muted); font-size: .8rem; padding-top: .08rem; }
.rank-list .rows { margin: .15rem 0 0; font-size: .82rem; }
.rank-list .rows li { grid-template-columns: 2.9rem minmax(0, 1fr); padding: 0; }
.card-bio { margin: 0 0 .45rem; font-size: .95rem; }
.card-motto { font-style: italic; color: var(--muted); margin: 0 0 .5rem; font-size: .9rem; }
.claim { font-size: .78rem; padding: .2rem .55rem; border-radius: 999px; background: #eef4f7; display: inline-block; margin-bottom: .5rem; color: var(--muted); }
.friends { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.friends li { text-align: center; font-size: .78rem; line-height: 1.2; }
.friends img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; margin-bottom: .2rem; background: #dfe9ee; }
.friends .why { color: var(--muted); display: block; font-size: .7rem; }
.pymk li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .3rem 0; font-size: .86rem; }
.pymk .mutual { color: var(--muted); font-size: .75rem; display: block; }
.pymk button { border: 0; border-radius: 6px; background: #e7eef7; color: var(--navy); font: 700 .8rem var(--ui-font); padding: .3rem .55rem; cursor: pointer; }
.pymk button:disabled { opacity: .55; cursor: default; }

.gate-msg { max-width: 34rem; margin: 4rem auto; text-align: center; padding: 0 1rem; }
.gate-msg h1 { font: 900 2.4rem/1.05 var(--sign-font); color: var(--navy); }

/* three columns as long as they fit; side columns slim down first */
@media (max-width: 80rem) { .cols { grid-template-columns: minmax(12rem, 14rem) minmax(0, 1fr) minmax(16rem, 19rem); } }
/* tablet: left column becomes one scrolling row of Explore links; the extra boxes hide */
@media (max-width: 58rem) {
  .cols { grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem); }
  .col-left { position: static; max-height: none; grid-column: 1 / -1; overflow: visible; }
  .col-left .box { margin: 0; padding: .4rem .5rem; }
  .col-left .box:not(:first-child), .col-left .box h2 { display: none; }
  .nav { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
  .nav button { width: auto; white-space: nowrap; }
}
/* phone: one column, profile first */
@media (max-width: 46rem) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .col-right { position: static; max-height: none; order: -1; }
  .search { display: none; }
}
html, body { overflow-x: clip; }   /* clip, not hidden: hidden would make body a scroll box and break the pinned columns */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise .25s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } }
}
.group-banner { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 8px 8px 0 0; background: var(--navy-2); }
.reposted { font-size: .8rem; color: var(--muted); font-weight: 700; margin: -.2rem 0 .45rem; }
.about .rows { margin: .6rem 0 0; }
.about .card-bio { font-size: .95rem; }

/* big portrait at the top of the profile, framed in the rarity colour */
.portrait { position: relative; margin: .7rem .7rem 0; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 4px var(--ring, var(--common)); }
.portrait img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #dfe9ee; }
.portrait span { position: absolute; left: .5rem; bottom: .5rem; background: rgba(20, 40, 75, .78); color: #fff; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.profile .p-inner { padding-top: .6rem; }

.group-cover img { object-position: 50% 38%; }

.group-plain { aspect-ratio: 6 / 1; border-radius: 8px 8px 0 0; background:
  repeating-linear-gradient(90deg, var(--frame) 0 34px, #fff 34px 68px) bottom / 100% 30% no-repeat, var(--navy); }

/* side columns stay beside the feed while it scrolls. No inner scroll box, nothing cut off: a column shorter than
   the screen pins under the header; a taller one scrolls with the page until its bottom is in view, then pins there
   (book.js stickySides() sets `top` from the column's height). */
.col-left, .col-right { position: sticky; top: 3.9rem; max-height: none; overflow: visible; align-self: start; }
@media (max-width: 58rem) { .col-left { position: static; } }
@media (max-width: 46rem) { .col-right { position: static; } }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .55rem; }
.filters select { font: 500 .95rem var(--ui-font); padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); min-height: 2.4rem; max-width: 100%; }

/* overlay: big portrait + traits */
.ov { border: 0; padding: 0; border-radius: 12px; width: min(62rem, 96vw); max-height: 94vh; background: #fff; color: var(--ink); }
.ov::backdrop { background: rgba(20, 40, 75, .7); }
.ov-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(17rem, 1fr); }
.ov-body > img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #dfe9ee; }
.ov-info { padding: 1rem 1.1rem; display: flex; flex-direction: column; overflow: auto; max-height: 94vh; }
.ov-info h2 { font: 900 2.2rem/1 var(--sign-font); color: var(--navy); margin: 0 0 .25rem; }
.ov-sub { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }
.ov .traits { border-collapse: collapse; width: 100%; font-size: .9rem; }
.ov .traits th { text-align: left; color: var(--muted); font-weight: 600; padding: .2rem .3rem; border-bottom: 1px solid var(--line); }
.ov .traits td { padding: .3rem; border-bottom: 1px solid #eef3f6; }
.ov .traits td:last-child { text-align: right; white-space: nowrap; color: var(--muted); }
.ov .traits tr.rare td:nth-child(2) a { color: var(--frame); font-weight: 800; }
.ov-nav { margin-top: auto; padding-top: .9rem; display: flex; gap: .5rem; align-items: center; }
.ov-nav .go.small { text-decoration: none; text-align: center; flex: 1; }
.ov-nav button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .5rem .8rem; font: 700 1rem var(--ui-font); cursor: pointer; color: var(--ink); }
.ov-nav button:disabled { opacity: .4; cursor: default; }
@media (max-width: 46rem) { .ov-body { grid-template-columns: 1fr; } }

.traits-btn { display: block; width: 100%; margin: 0 0 .6rem; padding: .45rem; border: 1px solid var(--line); border-radius: 8px; background: #eef3f8;
  color: var(--navy); font: 700 .9rem var(--ui-font); cursor: pointer; }
.traits-btn:hover { background: #e2eaf3; }

/* metadata view: the whole image, never cropped */
.ov { max-height: 96vh; overflow: auto; }
.ov-body { align-items: stretch; }
.ov-body > img { align-self: start; }
.ov-info { min-height: 100%; }
.ov-body > img { width: 100%; height: auto; max-height: 92vh; aspect-ratio: auto; object-fit: contain; background: #14284b; }

/* ------------------------------------------------------------ dark mode */
.book.dark { --page: #0d1520; --ink: #e4ebf2; --muted: #93a4b5; --line: #24344a; --card: #152131; --soft: #1b2a3d;
  background: var(--page); color: var(--ink); }
.book.dark .box, .book.dark .card, .book.dark .group-head, .book.dark .ov, .book.dark .more, .book.dark .filters select,
.book.dark .ov-nav button, .book.dark .composer textarea { background: var(--card); color: var(--ink); border-color: var(--line); }
.book.dark .composer textarea { background: var(--soft); }
.book.dark .box h2, .book.dark .mid-h, .book.dark .card-name, .book.dark .ov-info h2, .book.dark .gate-msg h1 { color: #dbe7f5; }
.book.dark .link, .book.dark .mini a, .book.dark .member-grid a, .book.dark .story, .book.dark .nav button { color: var(--ink); }
.book.dark .nav button:hover, .book.dark .rx-btns button:hover { background: var(--soft); }
.book.dark .nav button[aria-current="true"] { background: #2a4a7f; color: #fff; }
.book.dark .badge, .book.dark .news-tag, .book.dark .claim, .book.dark .traits-btn, .book.dark .pymk button { background: var(--soft); color: #cfe0f5; }
.book.dark .badge.rarebadge { background: #3a2f10; color: #f3d27a; }
.book.dark .badge.rarebadge.one { background: #4a3a12; color: #ffe08a; }
.book.dark .rx, .book.dark .rank-list li, .book.dark .ov .traits td, .book.dark .thread { border-color: var(--line); }
.book.dark .rank-list .n, .book.dark .card-sub, .book.dark .row-k, .book.dark .count { color: var(--muted); }
.book.dark .story img { box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--ring, var(--frame)); }
.book.dark .p-avatar { border-color: var(--card); }
.book.dark .tag { color: #6fb0ff; }
.book.dark .ov::backdrop { background: rgba(0, 0, 0, .75); }
.book.dark .group-plain { background: repeating-linear-gradient(90deg, var(--frame) 0 34px, #e9edf2 34px 68px) bottom / 100% 30% no-repeat, #14284b; }

/* mail: inbox rows + reader */
.mbox-head { display: flex; align-items: center; gap: .7rem; margin: .2rem 0 .8rem; }
.mbox-head b { display: block; font: 800 1.05rem var(--ui-font); color: var(--navy); }
.book.dark .mbox-head b { color: var(--ink); }
.inbox { padding: 0; overflow: hidden; }
.mail-row { display: flex; gap: .75rem; align-items: flex-start; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: inherit; font: inherit; padding: .8rem 1rem; cursor: pointer; position: relative; }
.mail-item { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.mail-item:last-child { border-bottom: 0; }
.mail-item .mail-row { border-bottom: 0; flex: 1; min-width: 0; }
.mail-del { flex: 0 0 auto; width: 2.8rem; border: 0; background: none; font-size: 1rem; cursor: pointer; opacity: .45; }
.mail-item:hover .mail-del, .mail-del:focus-visible { opacity: .9; }
.mail-del:hover { background: rgba(196, 32, 46, .1); opacity: 1; }
.reader-acts { display: flex; gap: .5rem; }
@media (hover: none) { .mail-del { opacity: .8; } }
.mail-row:hover { background: rgba(127, 150, 175, .1); }
.mail-row.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #c4202e; }
.mail-av { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 1rem var(--ui-font); }
.mail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.mail-line { display: flex; justify-content: space-between; gap: .8rem; }
.mail-from, .mail-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-from { font-weight: 600; }
.mail-subj { color: var(--muted); font-size: .92rem; }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { font-weight: 800; color: inherit; }
.mail-time { flex: 0 0 auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.mail-meta { color: var(--muted); font-size: .8rem; }
.reader-bar { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.reader-bar .soc-btn { flex: 0 0 auto; padding: .4rem .9rem; }
.reader-subj { font: 800 1.4rem/1.25 var(--ui-font) !important; margin: 0 0 .7rem !important; }
.reader-from { display: flex; align-items: flex-start; gap: .65rem; padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px solid var(--line); }
.reader-from > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reader-to { display: block; }
.mail-html { display: block; width: 100%; height: 80px; border: 0; border-radius: 8px; background: #fff; }
.mail-text { white-space: pre-wrap; font: 1rem/1.55 var(--ui-font); overflow-wrap: anywhere; }
.pics-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.attach { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.attach-chip { border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; font-weight: 700; font-size: .88rem; color: inherit; text-decoration: none; }
.attach-chip:hover { background: rgba(127, 150, 175, .12); }
.filters input { font: 500 .95rem var(--ui-font); padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 6px; min-height: 2.4rem; }

.badge.staff { background: #e7f0ff; color: #1f4d8f; }
.book.dark .badge.staff { background: #22324a; color: #9fc0ef; }

/* unnumbered lists: no rank column */
.rank-list.plain > li { grid-template-columns: 3rem minmax(0, 1fr) auto; }
.rank-list .rows li { border: 0; padding: 0; display: grid; }

/* birthday: balloons float up over the page, a ribbon on the card */
.balloons { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.balloon { position: absolute; left: var(--x); bottom: -9rem; width: calc(3.2rem * var(--s)); height: calc(4rem * var(--s)); border-radius: 50% 50% 48% 48%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .7) 0 8%, transparent 9%), var(--c); box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .12);
  animation: floatup var(--d) ease-in var(--delay) 2 backwards; opacity: .92; }
.balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 4.5rem; background: rgba(120, 120, 120, .7); }
.balloon::before { content: ""; position: absolute; left: calc(50% - 4px); top: calc(100% - 2px); border: 4px solid transparent; border-bottom-color: var(--c); transform: rotate(180deg); }
@keyframes floatup { 0% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(18px, calc(-50vh - 10rem)) rotate(4deg); } 100% { transform: translate(-10px, calc(-100vh - 20rem)) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .balloon { animation: none; bottom: auto; top: calc(8% + (var(--s) * 10%)); } .balloon:nth-child(n+7) { display: none; } }
.bday-ribbon { margin: 0 0 .5rem; padding: .3rem .6rem; border-radius: 6px; background: linear-gradient(90deg, #c4202e, #d4a017); color: #fff; font-weight: 800; font-size: .9rem; }
.mini-btn { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 6px; padding: .1rem .5rem; font: 700 .78rem var(--ui-font); cursor: pointer; }
.about select { font: 500 .85rem var(--ui-font); padding: .15rem .3rem; border-radius: 5px; border: 1px solid var(--line); background: transparent; color: inherit; }

.rank-list.plain.place-list > li { grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: .8rem; }
.place-thumb { width: 7.5rem; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 5px; background: var(--navy-2); display: block; }

/* leaving-the-site warning + toast */
.leave { border: 0; border-radius: 12px; padding: 1.2rem 1.3rem; max-width: 30rem; background: #fff; color: var(--ink); }
.leave::backdrop { background: rgba(20, 40, 75, .7); }
.leave h2 { font: 900 1.7rem/1.1 var(--sign-font); color: var(--navy); margin: 0 0 .5rem; }
.leave-url { font: 600 .95rem var(--ui-font); background: #eef3f8; padding: .5rem .6rem; border-radius: 6px; overflow-wrap: anywhere; }
.leave-nav { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.leave-nav button:not(.go) { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: .45rem .9rem; font: 700 .95rem var(--ui-font); cursor: pointer; color: inherit; }
.book.dark .leave { background: var(--card); color: var(--ink); } .book.dark .leave h2 { color: #dbe7f5; } .book.dark .leave-url { background: var(--soft); }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 8px; font-weight: 700; z-index: 30; }
.site-input { font: 500 .85rem var(--ui-font); padding: .2rem .4rem; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: inherit; width: 12rem; max-width: 100%; }

.about h2 { display: flex; justify-content: space-between; align-items: center; }
.about-editor { display: grid; gap: .4rem; margin-bottom: .5rem; }
.about-input { width: 100%; font: 1rem/1.45 var(--ui-font); padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; resize: vertical; }
.about-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.copy-btn { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 5px; width: 1.7rem; height: 1.5rem; padding: 0; font-size: .95rem; line-height: 1; cursor: pointer; vertical-align: middle; }
.copy-btn:hover { background: rgba(127, 150, 175, .15); }

/* my home */
.who-link { color: #fff; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: .3rem .8rem; }
.who-link:hover { background: rgba(255,255,255,.12); }
.home-addr { font: 600 .9rem/1.4 var(--ui-font); overflow-wrap: anywhere; margin: 0 0 .5rem; }
.home-stats { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: baseline; }
.home-num { font: 900 1.6rem/1 var(--sign-font); color: var(--navy); margin-right: .2rem; }
.book.dark .home-num { color: var(--ink); }
.box > .go.small { margin-top: .6rem; }
.mini li > div { flex: 1; min-width: 0; }

/* feed tabs (For you / Following) and the follow + friend buttons */
.feed-tabs { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .75rem; overflow: hidden; }
.feed-tabs a { flex: 1; text-align: center; padding: .7rem .5rem; font: 800 .98rem var(--ui-font); color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.feed-tabs a[aria-selected="true"] { color: var(--navy); border-bottom-color: #c4202e; }
.feed-tabs a:hover { background: rgba(20, 40, 75, .05); }
.book.dark .feed-tabs { background: var(--card, #16233a); border-color: var(--line); }
.book.dark .feed-tabs a[aria-selected="true"] { color: var(--ink); }
.soc { display: flex; gap: .5rem; margin: .5rem 0 .2rem; }
.profile .soc { margin: 0 0 .9rem; }
.soc-btn { flex: 1; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 6px; padding: .45rem .5rem; font: 800 .9rem var(--ui-font); cursor: pointer; }
.soc-btn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.soc-btn.go-ish { background: #c4202e; color: #fff; border-color: #c4202e; }
.soc-btn:disabled { opacity: .55; cursor: default; }
.book.dark .soc-btn { background: transparent; color: var(--ink); }
.book.dark .soc-btn.on { background: var(--ink); color: var(--navy); }
.book.dark .soc-btn.go-ish { background: #c4202e; color: #fff; border-color: #c4202e; }
.note:empty { display: none; }
.home-h { font: 800 1.05rem/1.2 var(--ui-font); color: var(--navy); margin: 1rem 0 .3rem; }
.book.dark .home-h { color: var(--ink); }
.home-mail .meta { margin-top: 0; }
.back-link { display: inline-block; margin-bottom: .3rem; font-weight: 700; }
/* mail: compose + tabs */
.mbox-head > div { flex: 1; min-width: 0; }
.mbox-head .soc-btn { flex: 0 0 auto; }
.mail-tabs { margin-bottom: .6rem; }
.composer-mail { display: flex; flex-direction: column; gap: .55rem; }
.mail-field { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: .5rem; border-bottom: 1px solid var(--line); padding-bottom: .45rem; }
.mail-field > span:first-child { color: var(--muted); font-size: .88rem; font-weight: 700; }
.mail-field input { border: 0; background: transparent; color: inherit; font: inherit; padding: .3rem 0; outline: none; min-width: 0; }
.mail-field input:focus-visible { box-shadow: 0 2px 0 #c4202e; }
.mail-from-fixed { font-weight: 600; overflow-wrap: anywhere; }
.composer-mail textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: .7rem .8rem; font: 1rem/1.55 var(--ui-font); background: transparent; color: inherit; resize: vertical; }
.book.dark .composer-mail textarea { background: var(--soft); }
.mail-send-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 560px) { .mail-field { grid-template-columns: 1fr; gap: .1rem; } .mbox-head { flex-wrap: wrap; } }
/* groups */
.glist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.glist a { display: flex; gap: .75rem; align-items: center; text-decoration: none; color: inherit; padding: .3rem; border-radius: 8px; }
.glist a:hover { background: rgba(127, 150, 175, .1); }
.glist-img { width: 7.5rem; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 6px; flex: 0 0 auto; display: block; }
.glist b { display: block; font-size: 1rem; }
.g-about { white-space: pre-wrap; margin: .55rem 0 .2rem; }
.group-head p.g-about { color: var(--ink); font-size: 1.02rem; line-height: 1.45; }
.group-head p.g-meta { margin-top: .15rem; }
.g-runby { display: flex; align-items: center; gap: .45rem; margin: .55rem 0 .1rem; color: var(--muted); font-size: .92rem; }
.g-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: .75rem 0 .2rem; }
.g-actions .soc-btn { flex: 0 0 auto; padding: .5rem 1rem; }
.g-join { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem 1.1rem .35rem .4rem !important; border-radius: 999px; font-size: .95rem; }
.g-join .av.s { box-shadow: 0 0 0 2px #fff; }
.group-head p.g-fine { font-size: .78rem; margin-top: .35rem; }
.g-btns { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.g-form, .g-edit { display: flex; flex-direction: column; gap: .8rem; }
.g-field { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .9rem; }
.g-field input, .g-field textarea, .g-field select { font: 400 1rem var(--ui-font); padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; }
.book.dark .g-field select option { background: var(--card); }
.banner-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .4rem; max-height: 15rem; overflow-y: auto; padding: .2rem; }
.banner-pick button { padding: 0; border: 3px solid transparent; border-radius: 7px; background: none; cursor: pointer; }
.banner-pick button[aria-checked="true"] { border-color: #c4202e; }
.banner-pick img { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 4px; }
.chat { display: flex; flex-direction: column; gap: .5rem; }
.chat-top { display: flex; justify-content: space-between; align-items: baseline; }
.chat-top h2 { margin: 0; }
.chat-list { height: 24rem; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; padding: .3rem .2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chat-msg { display: flex; gap: .55rem; align-items: flex-start; }
.chat-msg > div { flex: 1; min-width: 0; }
.chat-meta { display: flex; align-items: baseline; gap: .3rem; font-size: .88rem; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.chat-del { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; font-size: .8rem; }
.chat-msg:hover .chat-del, .chat-del:focus-visible { opacity: 1; }
.chat-in { display: flex; gap: .5rem; align-items: flex-end; }
.chat-in textarea { flex: 1; resize: none; font: 1rem/1.4 var(--ui-font); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.book.dark .chat-in textarea { background: var(--soft); }
@media (max-width: 560px) { .glist-img { width: 5.5rem; } .chat-list { height: 60vh; } }
/* group banners (uploaded), posts */
.group-banner.group-plain { height: auto; aspect-ratio: 3 / 1; }
.glist-img.group-plain { height: auto; }
.banner-up { display: flex; flex-direction: column; gap: .45rem; font-weight: 400; }
.banner-prev img, .banner-prev .group-plain { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 8px; height: auto; }
.banner-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.banner-row .soc-btn { flex: 0 0 auto; padding: .4rem .9rem; }
.main-post { border-left: 4px solid #c4202e; }
.gp-compose { display: flex; flex-direction: column; gap: .5rem; }
.gp-compose textarea { width: 100%; box-sizing: border-box; resize: vertical; font: 1rem/1.5 var(--ui-font); padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.book.dark .gp-compose textarea { background: var(--soft); }
.gp-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.gp-go { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.gp-thumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.gp-thumbs:empty { display: none; }
.gp-thumb { position: relative; }
.gp-thumb img { width: 5rem; height: 5rem; object-fit: cover; border-radius: 6px; display: block; }
.gp-thumb button { position: absolute; top: 2px; right: 2px; border: 0; border-radius: 50%; width: 1.4rem; height: 1.4rem; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; font-size: .75rem; }
.gp-tools { margin-left: auto; display: flex; gap: .3rem; }
.gp-imgs { display: grid; gap: 4px; margin-top: .5rem; border-radius: 8px; overflow: hidden; }
.gp-imgs.n2, .gp-imgs.n4 { grid-template-columns: 1fr 1fr; }
.gp-imgs.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gp-imgs.n3 a:first-child { grid-row: span 2; }
.gp-imgs img { display: block; width: 100%; height: 100%; max-height: 28rem; object-fit: cover; }
.gp-imgs.n2 img, .gp-imgs.n3 img, .gp-imgs.n4 img { aspect-ratio: 1; max-height: none; }
.mail-new, .mini .mail-new { margin-left: .5rem; background: #c4202e; color: #fff; border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 800; }
.mailboxes .mini-btn { text-decoration: none; }
/* paid groups: on top, gold */
.glist li.paid a { background: linear-gradient(90deg, rgba(212, 160, 23, .16), rgba(212, 160, 23, .04)); box-shadow: inset 4px 0 0 #d4a017; }
.glist li.paid a:hover { background: linear-gradient(90deg, rgba(212, 160, 23, .24), rgba(212, 160, 23, .08)); }
.paid-badge { margin-left: .45rem; vertical-align: .1em; background: #d4a017; color: #14284b; border-radius: 999px; padding: .05rem .5rem; font-size: .7rem; font-weight: 800; }
.soc-btn.soon { opacity: .6; }
.g-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 .95rem; }
.g-chip { border: 2px solid #2e7dd7; background: #2e7dd7; color: #fff; border-radius: 999px; padding: .32rem .85rem; font: 800 .88rem var(--ui-font); text-decoration: none; }
.g-chip:hover { filter: brightness(1.12); }
.g-chip.paid { background: #d4a017; border-color: #d4a017; color: #14284b; }
.g-chip.add { background: transparent; border: 2px dashed #c4202e; color: #c4202e; }
.book.dark .g-chip { color: #fff; }
.book.dark .g-chip.paid { color: #14284b; }
.book.dark .g-chip.add { border-color: #ff6b78; color: #ff8a94; }
/* ads: one card, three spots */
.ad { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: .75rem; }
.book.dark .ad { background: var(--card); }
.ad-tag { position: absolute; top: .45rem; left: .45rem; z-index: 1; background: rgba(20, 40, 75, .82); color: #fff; font: 700 .68rem var(--ui-font); padding: .12rem .45rem; border-radius: 4px; }
.ad-img img { display: block; width: 100%; aspect-ratio: 1200 / 628; object-fit: cover; }
.ad-text { padding: .55rem .7rem .65rem; display: flex; flex-direction: column; gap: .15rem; }
.ad-head { font: 800 .98rem/1.25 var(--ui-font); color: var(--navy); text-decoration: none; }
.ad-head:hover { text-decoration: underline; }
.book.dark .ad-head { color: var(--ink); }
.ad-body { margin: 0; font-size: .88rem; line-height: 1.35; color: var(--ink); }
.ad-by { font-size: .78rem; color: var(--muted); }
.ad-feed .ad-head { font-size: 1.1rem; }
.ad-feed .ad-body { font-size: .95rem; }
#ad-left .ad { margin-bottom: .2rem; }
.ad-sell { display: block; text-align: right; font-size: .75rem; color: var(--muted); margin: 0 .2rem .75rem; text-decoration: none; }
.ad-sell:hover { text-decoration: underline; }
.ad-previews { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: start; }
.ad-prev { display: flex; flex-direction: column; gap: .35rem; }
.ad-prev > b { font-size: .82rem; color: var(--muted); }
.ad-prev.wide { grid-column: 1 / -1; }
.ad-prev:not(.wide) .ad { max-width: 17rem; }
.ad-queue li { align-items: flex-start; }
@media (max-width: 560px) { .ad-previews { grid-template-columns: 1fr; } }
@media (max-width: 58rem) { #ad-left { display: none !important; } }   /* the left column folds into a link row: its ad hides (feed + right ads remain) */
.ad-terms { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.ad-img img[src$=".gif"] { image-rendering: auto; }
/* comments */
.rx-count { border: 0; background: none; color: inherit; cursor: pointer; font: inherit; padding: 0; }
.rx-count:hover { text-decoration: underline; }
.cm-thread { border-top: 1px solid var(--line); margin-top: .55rem; padding-top: .55rem; display: flex; flex-direction: column; gap: .5rem; }
.cm-thread[hidden] { display: none; }
.cm-list { display: flex; flex-direction: column; gap: .45rem; }
.cm { display: flex; gap: .45rem; align-items: flex-start; }
.cm-bubble { background: rgba(127, 150, 175, .12); border-radius: 12px; padding: .4rem .7rem; max-width: 100%; min-width: 0; }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.cm-tools { display: flex; gap: .6rem; margin-top: .15rem; }
.cm-tools button, .cm-replying button { border: 0; background: none; padding: 0; color: var(--muted); font: 700 .78rem var(--ui-font); cursor: pointer; }
.cm-tools button:hover { text-decoration: underline; }
.cm-replies { margin-left: 2.4rem; display: flex; flex-direction: column; gap: .45rem; }
.cm-in { display: flex; gap: .45rem; align-items: flex-end; }
.cm-in textarea { flex: 1; resize: none; font: 1rem/1.4 var(--ui-font); padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 18px; background: transparent; color: inherit; min-width: 0; }
.book.dark .cm-in textarea { background: var(--soft); }
.cm-as { max-width: 8rem; font: .85rem var(--ui-font); padding: .4rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; }
.cm-replying { font-size: .8rem; color: var(--muted); }
/* notifications + activity cards */
.notes { padding: 0; overflow: hidden; }
.note { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem .9rem; border-bottom: 1px solid var(--line); position: relative; }
.note:last-child { border-bottom: 0; }
.note.unread { background: rgba(46, 125, 215, .1); }
.note.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #2e7dd7; }
.note-ic { width: 1.4rem; text-align: center; flex: 0 0 auto; padding-top: .3rem; }
.note-body { flex: 1; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.note-q { color: var(--muted); }
.act-card { padding-top: .6rem; padding-bottom: .6rem; }
.act-card .card-who { font-weight: 500; }
.wallet-cell .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; }
.wallet-in { width: 100%; max-width: 15rem; font: .85rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: inherit; }
.g-export { display: flex; gap: .4rem; margin: -.1rem 0 .55rem; }
/* tasks */
.task-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .4rem; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; border-radius: 6px; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: rgba(127, 150, 175, .1); }
.task-row.closed { opacity: .55; }
.task-reward { flex: 0 0 auto; min-width: 5.5rem; text-align: center; background: #d4a017; color: #14284b; border-radius: 8px; padding: .3rem .5rem; font-size: .78rem; font-weight: 700; }
.task-reward b { display: block; font: 900 1.15rem/1 var(--sign-font); }
.task-reward.big { display: inline-block; margin-bottom: .4rem; }
.task-reward.big b { font-size: 1.6rem; }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.task-st { flex: 0 0 auto; font-size: .78rem; font-weight: 800; border-radius: 999px; padding: .2rem .6rem; background: rgba(127, 150, 175, .18); }
.task-st.st-approved, .task-st.st-paid { background: #2e7d32; color: #fff; }
.task-st.st-done { background: #2e7dd7; color: #fff; }
.task-step { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.task-step:last-child { border-bottom: 0; }
.task-step.ok .task-body > div { text-decoration: line-through; opacity: .7; }
.task-ic { width: 1.6rem; text-align: center; font-size: 1.1rem; }
.task-body { flex: 1; min-width: 12rem; }
.task-do { display: flex; gap: .4rem; flex: 1 1 100%; padding-left: 2.2rem; }
.task-url { flex: 1; min-width: 0; font: .9rem var(--ui-font); padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; }
.step-list { display: flex; flex-direction: column; gap: .45rem; font-weight: 400; }
.step-edit { display: grid; grid-template-columns: 13rem 1fr 1fr auto; gap: .4rem; align-items: center; }
.step-edit select, .step-edit input { font: .9rem var(--ui-font); padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: inherit; min-width: 0; }
.book.dark .step-edit select option { background: var(--card); }
.task-claims .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 560px) { .step-edit { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------ likes (other collections the Beast's wallet holds) */
.likes-cell { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.like-chip { display: inline-flex; align-items: center; padding: .12rem .5rem; border-radius: 999px; background: var(--chip, rgba(127,127,127,.14));
  color: var(--ink); text-decoration: none; font-size: .82rem; white-space: nowrap; }
.like-chip:hover { background: rgba(127,127,127,.25); }
.like-chip b { margin-left: .25rem; font-weight: 700; opacity: .7; }
.likes-edit { display: grid; gap: .45rem; width: 100%; }
.likes-list { display: grid; gap: .5rem; max-height: 22rem; overflow-y: auto; padding-right: .3rem; }
.likes-sec { display: grid; gap: .15rem; } .likes-sec[hidden], .like-opt[hidden] { display: none; }
.likes-sec h3 { font-size: .78rem; margin: .1rem 0; opacity: .75; font-weight: 700; }
.likes-search { width: 100%; font-size: .85rem; padding: .3rem .5rem; }
.like-opt { display: flex; align-items: center; gap: .3rem; font-size: .9rem; }
.likes-add { display: flex; gap: .3rem; } .likes-add input { flex: 1; min-width: 0; font-size: .8rem; }
.likes-btns { display: flex; gap: .4rem; align-items: center; }
.top3 { margin: 0; padding-left: 1.3rem; display: grid; gap: .2rem; font-size: .9rem; }
.top3 li.empty { opacity: .5; font-style: italic; }
.x-btn { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; padding: 0 .2rem; } .x-btn:hover { opacity: 1; }
.likes-sugg { display: grid; gap: .2rem; } .sugg-row { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .88rem; }
.coll-ic { width: 2.2rem; text-align: center; font-size: 1.3rem; }
.rows .top3 li { display: list-item; padding: .1rem 0; }
.rows li:has(> .likes-cell .likes-edit) { grid-template-columns: minmax(0, 1fr); }
.likes-edit .mini-btn { justify-self: start; }
.rows li.place-btn { display: block; padding-top: .3rem; }
.place-edit { display: grid; gap: .35rem; margin-top: .4rem; }
.place-f { display: grid; gap: .1rem; font-size: .8rem; } .place-f span { color: var(--muted); } .place-f input { font-size: .9rem; padding: .25rem .4rem; }

.card-name .flair { text-decoration: none; }
/* header, far right: your Beast's face (= Home) + the wallet menu */
.who-pfp { display: block; width: 2.3rem; height: 2.3rem; border-radius: 999px; overflow: hidden; border: 2px solid rgba(255,255,255,.75); flex: 0 0 auto; }
.who-pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who-pfp:hover, .who-pfp:focus-visible { border-color: #fff; }
.book-who .who-wallet { display: inline-flex; align-items: center; gap: .4rem; height: 2.3rem; padding: 0 .8rem; border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
  background: transparent; color: #fff; font: 700 .85rem var(--ui-font); cursor: pointer; }
.book-who .who-wallet:hover, .book-who .who-wallet[aria-expanded="true"] { background: rgba(255,255,255,.12); }
@media (max-width: 560px) {
  .who-wal-addr { display: none; } .book-who .who-wallet { padding: 0 .65rem; }
  .book-bar { gap: .45rem; padding: .45rem .6rem; } .book-bar .book-tag { display: none; } .book-mark { font-size: 1.7rem; margin-right: auto; }
}
.wallet-menu { position: fixed; z-index: 60; width: min(17rem, calc(100vw - 16px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--card, #fff);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(10,20,40,.25); padding: .5rem; color: var(--ink); }
.wm-addr { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .5rem .5rem; font: 800 .9rem var(--ui-font); border-bottom: 1px solid var(--line); }
.wm-h { margin: .55rem .5rem .3rem; font: 800 .68rem var(--ui-font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wm-list { display: grid; gap: 2px; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.wm-beast { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .35rem .5rem; border: 0; border-radius: 8px; background: transparent; color: inherit;
  font: 700 .9rem var(--ui-font); text-align: left; cursor: pointer; }
.wm-beast img { width: 1.9rem; height: 1.9rem; border-radius: 999px; object-fit: cover; }
.wm-beast span { flex: 1; }
.wm-beast b { color: var(--frame); }
.wm-beast:hover, .wm-beast:focus-visible, .wm-item:hover, .wm-item:focus-visible { background: rgba(20,40,75,.07); outline: none; }
.wm-beast.on { background: rgba(20,40,75,.09); }
.wm-item { display: block; width: 100%; margin-top: 2px; padding: .5rem; border: 0; border-radius: 8px; background: transparent; color: inherit; font: 700 .9rem var(--ui-font);
  text-align: left; text-decoration: none; cursor: pointer; }
.wm-out { color: var(--frame); }
.book.dark .wm-beast:hover, .book.dark .wm-item:hover, .book.dark .wm-beast.on { background: rgba(255,255,255,.08); }
/* small inline text button (Remove on a post) */
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--frame); }
#post-note:empty { display: none; }
/* dark mode reaches the very edge: the theme class sits on <body>, so the page behind it (html) follows too */
html:has(> body.book.dark) { background: #0d1520; color-scheme: dark; }

/* ------------------------------------------------------------- signed out: the sign-in page -- */
body.gated .book-bar, body.gated .stripes { display: none; }
.login { min-height: 100vh; box-sizing: border-box; max-width: 62rem; margin: 0 auto; padding: 3rem 1.25rem; display: grid;
  grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
.login[hidden] { display: none; }
.login-mark { font: 900 clamp(3.2rem, 8vw, 4.6rem)/.9 var(--sign-font); color: var(--navy); letter-spacing: .01em; }
.login-mark::first-letter { color: var(--frame); }
.login-tag { font: 600 1.35rem/1.35 var(--ui-font); color: var(--ink); margin: .8rem 0 1.4rem; max-width: 30rem; }
.login-faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; max-width: 26rem; }
.login-faces img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 6px 18px rgba(20, 40, 75, .18); }
.login-faces img:nth-child(2) { box-shadow: 0 0 0 3px var(--legend), 0 6px 18px rgba(20, 40, 75, .18); }
.login-card { font-family: var(--ui-font); background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem 1.5rem 1.3rem;
  box-shadow: 0 12px 34px rgba(20, 40, 75, .14); text-align: center; }
.login-card h1 { font: 900 1.9rem/1 var(--sign-font); color: var(--navy); margin: 0 0 .5rem; }
.login-sub { color: var(--muted); font-size: .95rem; margin: 0 0 1.1rem; }
.login-btn { width: 100%; border: 0; border-radius: 10px; padding: .85rem 1rem; background: var(--navy); color: #fff;
  font: 800 1.08rem var(--ui-font); cursor: pointer; }
.login-btn:hover { background: var(--navy-2); }
.login-fine { color: var(--muted); font-size: .8rem; line-height: 1.45; margin: .7rem 0 0; }
.login-fine a { color: inherit; }
.login-card hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
.login-alt { display: inline-block; border-radius: 10px; padding: .65rem 1.2rem; background: var(--frame); color: #fff; text-decoration: none; font: 800 .98rem var(--ui-font); }
.login-alt:hover { filter: brightness(1.08); }
#gate-note:empty { display: none; }
.book.dark .login-mark, .book.dark .login-card h1 { color: #dbe7f5; }
.book.dark .login-btn { background: #2a4a7f; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; gap: 1.6rem; padding: 2rem 1rem; text-align: center; min-height: 0; align-content: start; }
  .login-tag { margin-left: auto; margin-right: auto; font-size: 1.12rem; }
  .login-faces { margin: 0 auto; max-width: 18rem; }
}

/* "New posts" pill (livePoll) */
.new-pill { position: fixed; top: 4.4rem; left: 50%; transform: translateX(-50%); z-index: 40; border: 0; border-radius: 999px; padding: .5rem 1.1rem;
  background: var(--navy); color: #fff; font: 800 .9rem var(--ui-font); box-shadow: 0 6px 18px rgba(10, 20, 40, .3); cursor: pointer; }
.book.dark .new-pill { background: #2a4a7f; }

/* notifications that lead somewhere are clickable */
.note.go { cursor: pointer; }
.note.go:hover { background: rgba(127, 150, 175, .1); }
.note-link { text-decoration: underline; text-underline-offset: 2px; }
