/* jjscoolwebsite.com — about page only.
   JJ's profile on Facebork, a 2006 social network that never existed. The
   rest of the site is purple and bevelled; this is a white page with a blue
   bar across the top, flat boxes with pale headers and small grey type, the
   way the original student-directory sites looked — a different website
   sitting inside this one, which is the joke. Only the ads are loud. Colours
   are tokens on .about rather than the site's own palette, because nothing
   here is meant to match it. The page fills the whole band between the bars
   (no ticker here), so the site's checkered background never shows; the
   content sits in a centred column the way a fixed-width page would. */

.about {
  --fb-blue: #3b5998;
  --fb-dark: #29447e;
  --fb-pale: #d8dfea;
  --fb-wash: #eceff5;
  --fb-line: #b0b9d3;
  --fb-text: #333;
  --fb-grey: #666;
  --fb-online: #3f8f2b;
  --fb-red: #b3261e;

  flex: 1;
  background: #fff;
  /* The bork shakes the page's two halves sideways; this is what stops that
     showing up as a horizontal scrollbar. */
  overflow-x: clip;
  color: var(--fb-text);
  font-family: Tahoma, Verdana, Geneva, sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
}

.about [hidden] {
  display: none !important;
}

/* --- shared bits ------------------------------------------------------------- */

/* A dead link, really a button: everything on Facebork that "goes"
   somewhere opens a pop-up instead. */
.fb-link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--fb-blue);
  font: inherit;
  text-decoration: none;
  cursor: var(--cursor-link);
}

.fb-link:hover {
  text-decoration: underline;
}

.fb-link:disabled {
  color: var(--fb-grey);
  cursor: var(--cursor-blocked);
}

.fb-btn,
.mini,
.sign__send {
  padding: 0.2rem 0.7rem;
  background: var(--fb-blue);
  border: 1px solid var(--fb-dark);
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: var(--cursor-link);
}

.fb-btn:hover,
.mini:hover,
.sign__send:hover {
  background: var(--fb-dark);
}

.mini {
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
}

.mini[aria-pressed="true"] {
  background: var(--fb-pale);
  border-color: var(--fb-line);
  color: var(--fb-blue);
}

/* --- Facebork's own chrome ----------------------------------------------- */
/* The page's column: the blue bar above runs the full width, everything
   below it stays inside this. */
.fb-page {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 1.25rem 2rem;
}

.fb-head {
  background: var(--fb-blue);
  border-bottom: 1px solid var(--fb-dark);
}

.fb-head__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0.7rem 1.25rem;
}

.fb-logo {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.fb-logo__word {
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

/* The other half of the name, head tilted the way a dog's goes at its name. */
.fb-logo__bork {
  display: inline-block;
  color: #b8c6e6;
  transform: rotate(9deg) translateY(0.2em);
  transform-origin: left bottom;
}

.fb-logo__tag {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--fb-pale);
}

.fb-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.fb-search__label {
  color: #fff;
  font-weight: 700;
}

.fb-search__field {
  width: 10rem;
  min-width: 0;
  padding: 0.2rem 0.4rem;
  background: #fff;
  border: 1px solid var(--fb-dark);
  color: var(--fb-text);
  font: inherit;
}

.fb-search .fb-btn {
  background: var(--fb-pale);
  border-color: var(--fb-line);
  color: var(--fb-blue);
}

.fb-search .fb-btn:hover {
  background: #fff;
}

.fb-foot {
  margin-top: 2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--fb-pale);
  text-align: center;
  font-size: 0.7rem;
  color: var(--fb-grey);
}

.fb-foot__links {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0;
}

.fb-foot__links li + li::before {
  content: "|";
  margin: 0 0.45rem;
}

.fb-foot p {
  margin: 0;
}

/* --- ads ------------------------------------------------------------------- */
/* Buttons, so they can be clicked; none of them goes anywhere. They are the
   one loud thing on the page, as on any page of the era, and so keep their
   own colours instead of the page's. */
.fb-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 1rem;
  border: 1px solid #000;
  font: inherit;
  text-align: center;
  cursor: var(--cursor-link);
}

.fb-ad__label {
  align-self: flex-start;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

.fb-ad__shout {
  font-weight: 700;
  font-size: clamp(0.9rem, 2.6vw, 1.2rem);
}

.fb-ad__sub {
  font-size: 0.75rem;
  text-decoration: underline;
}

.fb-ad--strip {
  margin-top: 1.25rem;
  background: #e8318a;
  color: #fff;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.6rem;
}

.fb-ad--strip .fb-ad__label {
  flex-basis: 100%;
}

.fb-ad--strip .fb-ad__shout {
  font-size: 0.95rem;
}

.fb-ad--side {
  background: #c0392b;
  color: #fff;
  padding-block: 1rem;
}

.fb-ad__kicker {
  color: #ffe14d;
  font-style: italic;
}

.fb-ad--side .fb-ad__shout {
  font-size: 1.15rem;
  line-height: 1.2;
}

.fb-ad__go {
  margin-top: 0.4rem;
  padding: 0.2rem 0.7rem;
  background: #ffe14d;
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: no-preference) {
  .fb-ad--side .fb-ad__go {
    animation: blink 0.9s steps(1) infinite;
  }

  .fb-online__man {
    animation: blink-dot 1s steps(1) infinite;
  }
}

@keyframes blink {
  50% {
    visibility: hidden;
  }
}

@keyframes blink-dot {
  50% {
    background: #a6d99a;
  }
}

/* --- layout ---------------------------------------------------------------- */
.hs {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 52rem) {
  .hs {
    grid-template-columns: 19rem minmax(0, 1fr);
    align-items: start;
  }
}

.hs__side,
.hs__main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

/* --- boxes ------------------------------------------------------------------ */
.box {
  background: #fff;
  border: 1px solid var(--fb-pale);
  border-top: 1px solid var(--fb-blue);
  margin: 0;
}

/* The pale strip across the top, with the title in bold blue. */
.box__title {
  margin: 0;
  padding: 0.3rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
  background: var(--fb-pale);
  border-bottom: 1px solid var(--fb-line);
  color: var(--fb-blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.box__tag {
  font-size: 0.7rem;
  font-weight: 400;
}

.box__body {
  margin: 0;
  padding: 0.8rem 0.9rem 0.9rem;
}

.box__body p {
  margin: 0;
}

.box__body p + p {
  margin-top: 0.75rem;
}

.aside {
  color: var(--fb-grey);
}

.aside a {
  color: var(--fb-blue);
}

/* --- profile card ------------------------------------------------------------ */
.fb-card__name {
  font-size: 1.25rem;
}

.fb-card__top {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.card__pic {
  flex: none;
  display: block;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  border: 1px solid var(--fb-line);
  background: var(--fb-wash);
  padding: 4px;
}

.box__body .fb-card__facts p {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.box__body .fb-card__facts .fb-card__quote {
  color: var(--fb-grey);
  font-style: italic;
}

.fb-online {
  color: var(--fb-online);
  font-weight: 700;
}

.fb-online__man {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--fb-online);
}

.box__body .fb-nudge {
  margin: 0.9rem 0 0;
  text-align: center;
}

.fb-nudge__btn {
  width: 100%;
  padding: 0.7rem 0.5rem;
  background: var(--fb-blue);
  border: 1px solid var(--fb-dark);
  border-bottom-width: 4px;
  color: #fff;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: var(--cursor-link);
}

.fb-nudge__btn:hover {
  background: var(--fb-dark);
}

.fb-nudge__btn:active {
  border-bottom-width: 1px;
  margin-top: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .about.is-nudged > .fb-head,
  .about.is-nudged > .fb-page {
    animation: nudge 0.65s linear;
  }
}

/* A decaying shake: hard left and right at first, then settling. */
@keyframes nudge {
  0%, 100% { transform: translate(0, 0); }
  8%  { transform: translate(-12px, 3px); }
  16% { transform: translate(12px, -3px); }
  24% { transform: translate(-10px, 2px); }
  32% { transform: translate(10px, -2px); }
  42% { transform: translate(-8px, 2px); }
  52% { transform: translate(7px, -2px); }
  64% { transform: translate(-4px, 1px); }
  76% { transform: translate(3px, -1px); }
  88% { transform: translate(-1px, 0); }
}

.card__stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
}

.card__stats dt {
  color: var(--fb-grey);
  font-weight: 700;
}

.card__stats dd {
  margin: 0;
}

.box__body .card__hits {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--fb-grey);
}

.odometer {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  background: var(--fb-wash);
  border: 1px solid var(--fb-line);
  color: var(--fb-blue);
  font-family: "Courier New", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.15em;
}

.box__body .fb-viewmy {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.75rem;
}

/* --- contact box ----------------------------------------------------------- */
.fb-contact__grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.7rem;
}

.fb-contact__btn {
  width: 100%;
  height: 100%;
  padding: 0.3rem 0.4rem;
  background: var(--fb-wash);
  border: 1px solid var(--fb-pale);
  color: var(--fb-blue);
  font: inherit;
  font-size: 0.7rem;
  text-align: left;
  cursor: var(--cursor-link);
}

.fb-contact__btn:hover {
  background: var(--fb-pale);
}

.fb-contact__btn > span[aria-hidden] {
  display: inline-block;
  width: 1em;
  text-align: center;
}

.fb-contact__btn[aria-pressed="true"] {
  background: var(--fb-pale);
  border-color: var(--fb-line);
  font-weight: 700;
}

/* --- interests table -------------------------------------------------------- */
.fb-table {
  display: table;
  width: 100%;
  border-spacing: 0;
  padding: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.fb-table th,
.fb-table td {
  padding: 0.4rem 0.5rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--fb-wash);
}

.fb-table th {
  width: 5.5rem;
  color: var(--fb-grey);
  font-weight: 700;
}

.fb-table td {
  overflow-wrap: anywhere;
}

.fb-table tr:last-child th,
.fb-table tr:last-child td {
  border-bottom: 0;
}

.fb-school {
  font-size: 0.8rem;
}

.box__body .fb-school p + p {
  margin-top: 0.1rem;
}

.box__body .fb-school__name {
  color: var(--fb-blue);
  font-weight: 700;
}

/* --- skill chips (the Code row) --------------------------------------------- */
.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  background: var(--fb-pale);
  border: 1px solid var(--fb-line);
  color: var(--fb-blue);
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
}

/* --- right column bits ------------------------------------------------------ */
/* --- blog entries ------------------------------------------------------------ */
.entry + .entry {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dotted var(--fb-line);
}

.entry__title {
  margin: 0;
  font-size: 1rem;
  color: var(--fb-blue);
}

.box__body .entry__meta {
  margin: 0.2rem 0 0.6rem;
  color: var(--fb-grey);
  font-size: 0.75rem;
}

.entry__list {
  margin: 0;
  padding-left: 1.2rem;
}

.entry__list li + li {
  margin-top: 0.5rem;
}

.box__body .entry__foot {
  margin-top: 0.75rem;
}

.like {
  padding: 0.15rem 0.6rem;
  background: var(--fb-wash);
  border: 1px solid var(--fb-line);
  color: var(--fb-blue);
  font: inherit;
  font-size: 0.75rem;
  cursor: var(--cursor-link);
}

.like:hover {
  background: var(--fb-pale);
}

.like[aria-pressed="true"] {
  background: var(--fb-blue);
  border-color: var(--fb-dark);
  color: #fff;
}

/* --- friend space ------------------------------------------------------------ */
.box__body .fb-friendcount {
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}

.fb-friendcount strong {
  color: var(--fb-blue);
}

.friends {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 0.6rem;
}

@media (min-width: 34rem) {
  .friends {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.friend {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  font-size: 0.75rem;
  min-width: 0;
}

.friend__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--fb-blue);
  max-width: 100%;
  text-decoration: none;
}

.friend__name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.friend__link:hover .friend__name {
  text-decoration: underline;
}

.friend__online {
  color: var(--fb-online);
  font-size: 0.65rem;
  font-weight: 700;
}

.friend .mini {
  margin: 0.15rem 0 0;
}

/* --- avatars -----------------------------------------------------------------
   Pastel squares with a glyph on, one class per colour since the CSP allows
   no inline style. avatar--none is the default "no photo" silhouette. */
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--fb-line);
  color: #1d2b4f;
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
}

.avatar--small {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0.8rem;
}

.avatar--big {
  width: 5rem;
  height: 5rem;
  font-size: 1.4rem;
}

.avatar--1 { background: #bfe3a4; }
.avatar--2 { background: #ffe58a; }
.avatar--3 { background: #f3c28a; }
.avatar--4 { background: #b9c5e8; }
.avatar--5 { background: #e8a9a3; }
.avatar--6 { background: #cfd6e6; }
.avatar--7 { background: #f3f0c2; }
.avatar--8 { background: #2b3350; color: #d8dfea; }
.avatar--9 { background: #a9d6c4; }
.avatar--10 { background: #f2c0e0; }
.avatar--11 { background: #9fd9ea; }
.avatar--12 { background: #d9c4ea; }
.avatar--visitor { background: var(--fb-blue); color: #fff; font-size: 0.75rem; }

.avatar--none {
  align-items: end;
  background:
    radial-gradient(circle at 50% 36%, #fff 0 17%, transparent 18%),
    radial-gradient(ellipse 40% 30% at 50% 88%, #fff 0 99%, transparent 100%),
    #b9c0d4;
}

.avatar__none {
  width: 100%;
  padding: 0.05rem 0;
  background: rgba(41, 68, 126, 0.8);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
}

.avatar--small .avatar__none {
  font-size: 0.4rem;
}

/* --- comment wall -------------------------------------------------------------- */
.box__body .fb-wall__head {
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  color: var(--fb-grey);
}

.fb-wall__head [data-fb-shown],
.fb-wall__head [data-fb-total] {
  color: var(--fb-text);
  font-weight: 700;
}

.sign {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.sign__label {
  color: var(--fb-blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.sign__field {
  width: 100%;
  resize: vertical;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--fb-line);
  color: var(--fb-text);
  font: inherit;
}

.sign__send {
  align-self: flex-start;
}

.wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Name and picture on the left, date and words on the right: the layout
   every comment wall of the era had. */
.post {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  border-top: 1px solid var(--fb-pale);
}

.post:first-child {
  border-top: 0;
}

.post--visitor {
  background: var(--fb-wash);
}

.post__who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.4rem;
  font-size: 0.72rem;
  text-align: center;
}

.post__name {
  color: var(--fb-blue);
  font-weight: 700;
  overflow-wrap: anywhere;
  max-width: 100%;
  text-decoration: none;
}

a.post__name:hover {
  text-decoration: underline;
}

.post__main {
  padding: 0.6rem 0.8rem;
  min-width: 0;
}

.box__body .post__when {
  color: var(--fb-grey);
  font-size: 0.7rem;
}

.box__body .post__body {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.box__body .fb-lost {
  margin-top: 0.8rem;
  padding: 0.4rem 0.6rem;
  background: var(--fb-wash);
  border: 1px solid var(--fb-pale);
  color: var(--fb-red);
  font-size: 0.75rem;
  font-style: italic;
}

.box__body .fb-pager {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.8rem;
  font-size: 0.8rem;
}

/* --- sign-off ---------------------------------------------------------------- */
.sign-off {
  margin: 1rem 0 0;
  color: var(--fb-grey);
  text-align: center;
}

.sign-off--name {
  margin-top: 0;
  font-weight: 700;
  color: var(--fb-blue);
}

/* --- friends' profiles ---------------------------------------------------------
   Without script, a list at the bottom of the page. With it, the list is
   hidden and each card is copied into the pop-up when a friend is clicked. */
.fb-cards {
  margin-top: 1.25rem;
}

.fb-cards__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.fb-cards__list .fb-mini {
  padding: 0.7rem;
  background: var(--fb-wash);
  border: 1px solid var(--fb-pale);
}

/* list-style here, not just on the list: the pop-up gets a copy of the
   <li> on its own, outside any list. */
.fb-mini {
  list-style: none;
  font-size: 0.8rem;
  line-height: 1.5;
}

.fb-mini__name {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--fb-blue);
  overflow-wrap: anywhere;
}

.fb-mini__top {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.fb-mini p {
  margin: 0;
}

.fb-mini__offline {
  color: var(--fb-grey);
}

.fb-mini .fb-mini__bio,
.fb-mini .fb-mini__private {
  margin-top: 0.7rem;
}

.fb-mini__private {
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--fb-line);
  color: var(--fb-red);
  font-weight: 700;
}

.fb-mini__here {
  color: var(--fb-grey);
}

.fb-mini .fb-mini__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

/* --- the pop-up ------------------------------------------------------------------ */
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.fb-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 26, 0.6);
}

.fb-modal__box {
  position: relative;
  width: min(26rem, 100%);
  max-height: calc(100% - 2rem);
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--fb-dark);
  box-shadow: 4px 4px 0 rgba(16, 14, 26, 0.45);
}

.fb-modal__box:focus {
  outline: none;
}

.fb-modal__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem 0.3rem 0.7rem;
  background: var(--fb-blue);
  color: #fff;
}

.fb-modal__title {
  margin: 0;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.fb-modal__x {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  background: none;
  border: 1px solid transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: var(--cursor-link);
}

.fb-modal__x:hover {
  background: var(--fb-dark);
  border-color: var(--fb-pale);
}

.fb-modal__body {
  padding: 1rem 1rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.55;
}

.fb-modal__body > p {
  margin: 0;
}

.fb-modal__body > p + p {
  margin-top: 0.6rem;
}

.fb-modal__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 1rem 1rem;
}

/* --- the chat window ------------------------------------------------------------- */
.fb-chat {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  width: min(22rem, calc(100% - 2rem));
}

.fb-chat__ctl {
  display: flex;
  gap: 0.1rem;
}

.fb-chat__badge {
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  background: #e0443a;
  border-radius: 0.6rem;
  font-size: 0.75rem;
}

.fb-chat__badge[hidden] {
  display: none;
}

/* Minimised: just the title bar, a bit narrower, still bottom-centre. */
.fb-chat.is-min {
  width: min(13rem, calc(100% - 2rem));
}

.fb-chat.is-min .fb-chat__bar {
  cursor: var(--cursor-link);
}

.fb-chat.is-min .fb-chat__log,
.fb-chat.is-min .fb-chat__typing,
.fb-chat.is-min .fb-chat__form {
  display: none;
}

.fb-chat__seen {
  margin: -0.3rem 0 0.45rem;
  color: var(--fb-grey);
  font-size: 0.7rem;
  text-align: right;
}

.fb-chat__box {
  display: flex;
  flex-direction: column;
  max-height: min(26rem, calc(100vh - 2rem));
  background: #fff;
  border: 1px solid var(--fb-dark);
  box-shadow: 4px 4px 0 rgba(16, 14, 26, 0.45);
}

.fb-chat__box:focus {
  outline: none;
}

.fb-chat__log {
  flex: 1 1 auto;
  min-height: 10rem;
  overflow-y: auto;
  padding: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.fb-chat__msg {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  overflow-wrap: anywhere;
}

.fb-chat__text {
  min-width: 0;
}

.fb-chat__msg .fb-chat__pic {
  flex: none;
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
  border: 1px solid var(--fb-line);
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.fb-chat__msg img.fb-chat__pic {
  background: var(--fb-wash);
}

.fb-chat__who {
  font-weight: 700;
  color: var(--fb-blue);
}

.fb-chat__msg--you .fb-chat__who {
  color: var(--fb-grey);
}

.fb-chat__sys {
  margin: 0 0 0.45rem;
  color: var(--fb-grey);
  font-size: 0.75rem;
  text-align: center;
}

.fb-chat__typing {
  margin: 0;
  padding: 0 0.6rem 0.3rem;
  color: var(--fb-grey);
  font-size: 0.75rem;
  font-style: italic;
}

.fb-chat__form {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-top: 1px solid var(--fb-dark);
}

.fb-chat__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--fb-dark);
  font: inherit;
  font-size: 0.85rem;
}

/* Facebork Gold: the same pop-up, in gold, with a border it charges for. */
.fb-modal__box--gold {
  background: #fff4c2;
  border-color: #8a6d0f;
  outline: 3px dashed #e9b61d;
  outline-offset: -8px;
}

.fb-modal__box--gold .fb-modal__bar {
  background: #7a5a00;
}

.fb-modal__box--gold .fb-modal__body > p:first-child {
  font-size: 1.05rem;
  font-weight: 700;
}
