/*
 * The shared post page in the Expo app's look (post details screen).
 *
 * Values come from the app: colours from src/theme/colors.ts, type from
 * src/theme/typography.ts, layout from the post and reply card components, and the
 * classes rascal sends for the post details screen. The app counts a rem as 14px
 * (NativeWind), so the root is 14px and Tailwind steps are written as n × 0.25rem.
 */

@font-face { font-family: GothamBook; src: url(/fonts/GothamBook.otf) format("opentype"); font-display: swap; }
@font-face { font-family: GothamBold; src: url(/fonts/GothamBold.otf) format("opentype"); font-display: swap; }
@font-face {
  font-family: icomoon;
  src: url(/fonts/icomoon.woff?sgj5ve) format("woff"), url(/fonts/icomoon.ttf?sgj5ve) format("truetype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --achromatic-0: #FFFFFF;
  --achromatic-100: #F2F2F6;
  --achromatic-200: #D9D9DD;
  --achromatic-300: #8C8C90;
  --achromatic-400: #59595D;
  --achromatic-500: #404044;
  --achromatic-600: #26262A;
  --achromatic-700: #0D0D11;

  --orange-300: #FFB957; --orange-500: #FA7E0A; --orange-600: #E5660B;
  --green-300: #00D16F;  --green-500: #009D52;
  --teal-300: #55D1C1;   --teal-500: #27A899;
  --purple-300: #C8A8F3; --purple-500: #A867E9;
  --pink-300: #EFA0D7;   --pink-500: #E35BB5;
  --red-300: #FF9696;    --red-500: #E84C4C;
  --blue-300: #99B9F9;   --blue-500: #338DF5;

  /* The post's colour: a fill in light mode, the text colour in dark mode. */
  --post: var(--orange-500);
  --post-dark: var(--orange-300);

  /* The page's own surfaces (as on #208): bar, dialog, not-found page. */
  --surface: var(--achromatic-0);
  --hairline: var(--achromatic-100);
  --text: var(--achromatic-700);
  --muted: var(--achromatic-400);
  --brand: var(--orange-500);
  --on-brand: var(--achromatic-0);
  --brand-rgb: 250, 126, 10;
  --scrim: rgba(13, 13, 17, 0.5);
  /* The app's empty state: navy sky (blue-800, blue-950 in dark mode). */
  --sky: #0E3766;
}

.post-orange { --post: var(--orange-500); --post-dark: var(--orange-300); }
.post-green  { --post: var(--green-500);  --post-dark: var(--green-300);  }
.post-teal   { --post: var(--teal-500);   --post-dark: var(--teal-300);   }
.post-purple { --post: var(--purple-500); --post-dark: var(--purple-300); }
.post-pink   { --post: var(--pink-500);   --post-dark: var(--pink-300);   }
.post-red    { --post: var(--red-500);    --post-dark: var(--red-300);    }
.post-blue   { --post: var(--blue-500);   --post-dark: var(--blue-300);   }

html { font-size: 14px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--post);
  color: var(--achromatic-0);
  font-family: GothamBook, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
a { color: inherit; }
img, video, svg { display: block; }
button { font: inherit; }

.icon { width: 16px; height: 16px; flex-shrink: 0; }


/* ---- The page: bar on top, the post below (as on #208) ---- */

.share-page { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; width: 100%; min-height: 100vh; }
.share-post { display: flex; flex-direction: column; flex: 1; width: 100%; background: var(--post); }
.share-backdrop { display: none; }

.share-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.share-bar a { display: flex; align-items: center; text-decoration: none; }
.share-brand { color: var(--brand); }
.share-logo { height: 24px; width: auto; color: var(--brand); }
.share-cta, .get-app-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-family: GothamBold, Arial, sans-serif;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
}
.share-bar .share-cta { height: 36px; padding: 0 16px; font-size: 14px; line-height: 18px; color: var(--on-brand); }

/* Only a large screen with a mouse gets the post as a phone-width card over a backdrop
   of its own colour, with the app's street map across the top. */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .share-bar { height: 80px; padding: 0 40px; }
  .share-bar .share-logo { height: 36px; }
  .share-bar .share-cta { height: 48px; padding: 0 28px; font-size: 16px; line-height: 20px; }
  .share-post {
    flex: none;
    max-width: 480px;
    margin: 24px auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
  }
  .share-backdrop { display: block; position: fixed; inset: 0; z-index: 0; background: var(--post); }
  .share-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url(/images/explorer-pattern.svg) center top / 480px auto repeat-x;
    -webkit-mask-image: linear-gradient(#000 35%, transparent 80%);
    mask-image: linear-gradient(#000 35%, transparent 80%);
    opacity: 0.333;
  }
  /* "Post not found" has no post to frame: the whole page is its surface. */
  .share-post.state-not_found { max-width: none; margin: 0; border: 0; border-radius: 0; flex: 1; }
  .share-post.share-state.state-app_only { flex: 1; }
}

/* ---- The thread: the post and its replies on the post's colour ---- */

.thread-list { list-style: none; margin: 0; padding: 0; }

/* A card: post or reply. Full bleed on the post's colour. */
.card { position: relative; background: var(--post); }

/* The post itself ("hero"): a 4px rule under it (rascal post_shared.go). */
.card.hero { border-bottom: 4px solid var(--achromatic-0); }

/* Two columns in one padded frame: content, then the vote rail (TextPostCardV1). */
.card-frame { display: flex; flex-direction: row; gap: 1.25rem; padding: 1.25rem; direction: ltr; }
.card-content { display: flex; flex-direction: column; gap: 1.25rem; flex: 1; min-width: 0; }
/* The rail: the more button pinned to its top, the vote control centred below it. */
.card-rail { display: flex; flex-direction: column; width: 2.25rem; flex-shrink: 0; }
.rail-votes { display: flex; flex: 1; align-items: center; justify-content: center; }
.more-button { display: flex; align-items: center; justify-content: center; min-height: 1.75rem; color: var(--achromatic-0); cursor: pointer; }
.more-button .icon { width: 24px; height: 24px; }
.hero .card-body { min-height: 3.5rem; }
.card-body { display: flex; flex-direction: column; gap: 1.25rem; }

/* The original poster's line on their replies (ReplyCardFrame). */
.oj-line {
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
}

/* Header row: wraps, items 4px apart, a dot glued to its item at 2px (postHeaderRow). */
.card-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  column-gap: 4px;
  row-gap: 8px;
}
.separated { display: inline-flex; align-items: center; column-gap: 2px; }
.time-text, .dot { font-size: 10px; line-height: 14px; color: var(--achromatic-0); white-space: nowrap; }

/* The replier: a white capsule holding a coloured chip (UserButtonV1). */
.user-button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 9999px;
  background: var(--achromatic-0);
  /* Raised, as a chip that can be tapped (UserButtonV1's stroke below and to the side). */
  box-shadow: -1px 2px 0 var(--achromatic-200);
  cursor: pointer;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px 2px 4px;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px rgba(13, 13, 17, 0.05);
  color: var(--achromatic-0);
}
.user-chip.glyph-only { padding-right: 4px; }
.user-label { font-family: GothamBold, Helvetica, Arial, sans-serif; font-size: 10px; line-height: 14px; }
.user-arrow { margin-right: 2px; }

/* The chip's colour, and its arrow in the same colour. */
.chip-orange { background: var(--orange-500); } .chip-orange + .user-arrow { color: var(--orange-500); }
.chip-green  { background: var(--green-500); }  .chip-green + .user-arrow  { color: var(--green-500); }
.chip-teal   { background: var(--teal-500); }   .chip-teal + .user-arrow   { color: var(--teal-500); }
.chip-purple { background: var(--purple-500); } .chip-purple + .user-arrow { color: var(--purple-500); }
.chip-pink   { background: var(--pink-500); }   .chip-pink + .user-arrow   { color: var(--pink-500); }
.chip-red    { background: var(--red-500); }    .chip-red + .user-arrow    { color: var(--red-500); }
.chip-blue   { background: var(--blue-500); }   .chip-blue + .user-arrow   { color: var(--blue-500); }
.chip-post   { background: var(--post); }       .chip-post + .user-arrow   { color: var(--post); }

/* @channel and badge pills (ChannelPillV1 with its bevel). */
.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  background: rgba(13, 13, 17, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  color: var(--achromatic-0);
  font-family: GothamBold, Helvetica, Arial, sans-serif;
  font-size: 10px;
  line-height: 14px;
}
.channel-pill .icon { width: 12px; height: 12px; }

/* A verified name (Figma "UserTag", rascal buildVerifiedNameTag): a white outline, no
   fill, the verified glyph and the name on one line, cut at 96px. It never replaces
   the replier's "OJ" or number. */
.verified-tag {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 2px;
  max-width: 96px;
  padding: 0.125rem 0.25rem;
  border: 1px solid var(--achromatic-0);
  border-radius: 0.25rem;
  color: var(--achromatic-0);
  font-family: GothamBold, Helvetica, Arial, sans-serif;
  font-size: 10px;
  line-height: 14px;
}
.verified-tag .icon { width: 0.875rem; height: 0.875rem; }
.verified-tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Location (LocationPinV1): 16px pin, 10px label. */
.location-pin { display: inline-flex; align-items: center; gap: 0.125rem; font-size: 10px; line-height: 14px; color: var(--achromatic-0); }

/* The replier's poll choice (buildPollVoteTag). */
.poll-vote-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  max-width: 96px;
  padding: 0.125rem 0.25rem;
  overflow: hidden;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
  font-family: GothamBold, Helvetica, Arial, sans-serif;
  font-size: 10px;
  line-height: 14px;
}
.poll-vote-tag .icon { width: 12px; height: 12px; }
.poll-vote-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The message: text-m, white on the colour; the colour itself in dark mode. */
.post-message {
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  color: var(--achromatic-0);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Quoted reply (QuoteV1). */
.quote { display: flex; flex-direction: row; gap: 12px; overflow: hidden; }
.quote-line { width: 4px; flex-shrink: 0; border-radius: 9999px; background: rgba(255, 255, 255, 0.5); }
.quote-content { flex: 1; min-width: 0; padding: 4px 8px 4px 0; }
.quote-label { display: flex; align-items: center; gap: 4px; font-family: GothamBold, Helvetica, Arial, sans-serif; font-size: 10px; line-height: 14px; }
.quote-label .icon { width: 13px; height: 13px; margin: 1.5px; }
.quote-text {
  margin: 0;
  font-size: 16px;
  line-height: 20px;
  color: var(--achromatic-0);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* Pictures and videos: the picture reply's block (reply_card_component.go). */
.media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(13, 13, 17, 0.3);
}
.media img, .media video { width: 100%; height: auto; max-height: 80vh; object-fit: contain; }

/* Hidden pictures, as in the app (BlurredThumbnailV1 under a scrim, "Hold to view").
   The page only ever has a few pixels of the picture: blurred, they read as its colours. */
.picture-backdrop, .picture-block { background: #D1D5DB; } /* gray-300 */
.picture-backdrop img, .picture-block img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px);
  transform: scale(1.5);
}
.picture-scrim { position: absolute; inset: 0; background: rgba(13, 13, 17, 0.3); }

/* A picture post: the picture fills the whole card; the label sits in the middle,
   nudged off the rail as in PicturePostCardV1. */
.card.picture-card { overflow: hidden; cursor: pointer; }
.picture-backdrop { position: absolute; inset: 0; overflow: hidden; }
.picture-card .card-frame { position: relative; }
.picture-label {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding-inline-start: 2.75rem;
  font-size: 16px;
  line-height: 20px;
  color: var(--achromatic-0);
  text-align: center;
}

/* A picture reply: a 16:9 block in the reply (PictureReplyCardV1). */
.picture-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  cursor: pointer;
}
.picture-block-label {
  position: relative;
  padding: 0 1rem;
  font-family: GothamBold, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: var(--achromatic-0);
  text-align: center;
}

/* Footer: reply and share counts (CountBadge). */
.card-footer { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
.count { display: inline-flex; align-items: center; gap: 0.125rem; font-size: 10px; line-height: 14px; color: var(--achromatic-0); }
.add-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: 1px solid rgba(13, 13, 17, 0.05);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  color: var(--achromatic-0);
  cursor: pointer;
}
.add-reaction .icon { width: 2.25rem; height: 1.5rem; }
.media[data-get-app] { cursor: pointer; }

/* Votes (VoteControlV1): 32px glyphs around a text-m counter that may spill past the rail. */
.vote-control { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 2rem; cursor: pointer; }
.vote-glyph { width: 32px; height: 32px; color: var(--achromatic-0); }
.votes {
  display: block;
  width: 6rem;
  margin: 0 -2rem;
  text-align: center;
  font-size: 16px;
  line-height: 20px;
  color: var(--achromatic-0);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Polls (PollOptionV1, before results). */
.poll-options { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.poll-option {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}
.poll-option span { padding-left: 0.5rem; font-size: 16px; line-height: 20px; color: var(--achromatic-0); }
.poll-meta { font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.75); }

/* Promoted call to action and news link: the app's button, white on the post colour. */
.post-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--achromatic-0);
  color: var(--achromatic-700);
  font-family: GothamBold, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 20px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.post-link .icon { width: 24px; height: 24px; color: var(--post); }
.post-link-domain { font-family: GothamBook, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 16px; color: var(--achromatic-400); }

/* The page shows the first replies only: the last ones fade into the post's colour
   under a way into the app, where the whole thread is. */
.thread-more {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: -11rem;
  padding: 9rem 1.25rem 3rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--post) 6rem);
  text-align: center;
}
/* A heading: the app's xl type (24/28, bold). */
.thread-more-text {
  margin: 0;
  max-width: 24rem;
  padding: 0 0.5rem;
  font-family: GothamBold, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 28px;
  color: var(--achromatic-0);
}
/* On the post's colour the button is white with the colour as its text (the app's
   orange button would vanish on an orange post); in dark mode it's the app's orange. */
.thread-more .state-button {
  --brand-rgb: 255, 255, 255;
  align-self: stretch;
  margin: 0;
  background: var(--achromatic-0);
  color: var(--post);
}


/* ---- States: "Post not found" and "only in the app" (as on #208) ---- */

html.state-page body { background: var(--surface); }
.share-state {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--sky);
  color: var(--achromatic-0);
}
.share-state::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/illustrations/stars.svg) center / cover no-repeat;
}
.share-backdrop.state-sky { background: var(--sky); }
.share-backdrop.state-sky::after { content: none; }
.state-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 480px;
  padding: 1rem 0.5rem;
}
.state-illustration { display: block; width: 199px; height: 230px; }
.state-text { width: 100%; padding: 0 1rem; text-align: center; }
.state-title { margin: 0; font-family: GothamBold, Arial, sans-serif; font-weight: 400; font-size: 24px; line-height: 28px; }
.state-body { margin: 0; font-family: GothamBook, Arial, sans-serif; font-size: 16px; line-height: 20px; }
.state-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 48px;
  margin: 4px 17px 0;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  text-decoration: none;
  font-family: GothamBold, Arial, sans-serif;
  font-size: 16px;
  line-height: 20px;
}
.state-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: get-app-ring 1.6s ease-out infinite;
}

/* "Post not found": big bold type on the page's own surface, the street map behind it. */
.share-state.state-not_found { color: var(--text); background: var(--surface); }
.share-state.state-not_found::before {
  --fade-down: linear-gradient(#000 35%, transparent 80%);
  --fade-sides: linear-gradient(90deg, transparent calc(50% - 240px), #000 calc(50% - 150px),
                                #000 calc(50% + 150px), transparent calc(50% + 240px));
  background: var(--text);
  -webkit-mask-image: url(/images/explorer-pattern.svg), var(--fade-down), var(--fade-sides);
  -webkit-mask-size: 480px auto, 100% 100%, 100% 100%;
  -webkit-mask-position: center top, 0 0, 0 0;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-composite: source-in, source-in;
  mask-image: url(/images/explorer-pattern.svg), var(--fade-down), var(--fade-sides);
  mask-size: 480px auto, 100% 100%, 100% 100%;
  mask-position: center top, 0 0, 0 0;
  mask-repeat: no-repeat;
  mask-composite: intersect, intersect;
  opacity: 0.2;
}
.share-backdrop.state-not_found { background: var(--surface); }
.state-not_found .state-content { gap: 24px; padding: 32px 0.5rem; }
.state-code {
  margin: 0 0 8px;
  color: var(--brand);
  font-family: GothamBold, Arial, sans-serif;
  font-weight: 400;
  font-size: 120px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.state-not_found .state-title { font-size: 32px; line-height: 36px; }
.state-not_found .state-body { margin-top: 8px; color: var(--muted); }

/* ---- Get-the-app dialog: a centred card over the dimmed post (as on #208) ---- */

.get-app {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--scrim);
  touch-action: none;
}
.get-app[hidden] { display: none; }
.get-app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 40px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  animation: get-app-in 180ms ease-out;
}
.get-app-card > *, .get-app-card .for-computer > *, .get-app-card .for-phone > * { flex-shrink: 0; }
.get-app-card .share-logo { height: 32px; }
.get-app-title { margin: 24px 0 8px; font-family: GothamBold, Arial, sans-serif; font-weight: 400; font-size: 24px; line-height: 28px; }
.get-app-text { margin: 0 0 28px; color: var(--muted); font-family: GothamBook, Arial, sans-serif; font-size: 16px; line-height: 22px; }
.get-app-primary { position: relative; width: 100%; height: 52px; font-size: 16px; line-height: 20px; }
.get-app-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: get-app-ring 1.6s ease-out infinite;
}
.get-app-close {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
html[data-device="computer"] .for-phone,
html[data-device="phone"] .for-computer { display: none; }
/* No QR codes (they couldn't be made): computers get the phone's "Open Jodel". */
html[data-device="computer"] .get-app.no-qr .for-phone { display: flex; }
.for-phone, .for-computer { display: flex; flex-direction: column; align-items: center; width: 100%; }
.for-computer .get-app-text { margin-bottom: 20px; }
.get-app-tabs { display: flex; width: 100%; margin: 0 0 16px; padding: 4px; border-radius: 999px; background: var(--hairline); }
.get-app-tabs [role="tab"] {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: GothamBold, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
}
.get-app-tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(13, 13, 17, 0.12); }
.get-app-panel { display: flex; flex-direction: column; align-items: center; width: 100%; }
.get-app-panel[hidden] { display: none; }
.get-app-qr { width: min(100%, 48vh); aspect-ratio: 1; overflow: hidden; border: 1px solid var(--hairline); border-radius: 20px; background: #FFFFFF; }
.get-app-qr svg, .get-app-qr img { display: block; width: 100%; height: 100%; }
.get-app-panel .get-app-text { max-width: 300px; margin: 16px 0 0; font-size: 14px; line-height: 18px; }

@keyframes get-app-ring {
  0% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.55); }
  100% { box-shadow: 0 0 0 16px rgba(var(--brand-rgb), 0); }
}
@keyframes get-app-in { from { transform: scale(0.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .get-app-card, .get-app-primary::after, .state-button::after { animation: none; }
}

/* ---- Dark mode: neutral cards, the post colour becomes the text colour ---- */

@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--achromatic-600);
    --hairline: var(--achromatic-500);
    --text: var(--achromatic-0);
    --muted: var(--achromatic-300);
    --brand: var(--orange-300);
    --on-brand: var(--achromatic-700);
    --brand-rgb: 255, 185, 87;
    --scrim: rgba(0, 0, 0, 0.6);
    --sky: #03132A;
  }
  body, .share-post, .card, .share-backdrop { background: var(--achromatic-600); }
  .share-backdrop::after { opacity: 0.2; }
  .share-post { border-color: rgba(255, 255, 255, 0.12); }
  .card.hero { border-bottom-color: var(--achromatic-700); }
  .post-message { color: var(--post-dark); }
  .user-button { background: var(--achromatic-400); box-shadow: -1px 2px 0 var(--achromatic-300); }
  .user-chip { color: var(--achromatic-600); }
  .chip-orange { background: var(--orange-300); } .chip-orange + .user-arrow { color: var(--orange-300); }
  .chip-green  { background: var(--green-300); }  .chip-green + .user-arrow  { color: var(--green-300); }
  .chip-teal   { background: var(--teal-300); }   .chip-teal + .user-arrow   { color: var(--teal-300); }
  .chip-purple { background: var(--purple-300); } .chip-purple + .user-arrow { color: var(--purple-300); }
  .chip-pink   { background: var(--pink-300); }   .chip-pink + .user-arrow   { color: var(--pink-300); }
  .chip-red    { background: var(--red-300); }    .chip-red + .user-arrow    { color: var(--red-300); }
  .chip-blue   { background: var(--blue-300); }   .chip-blue + .user-arrow   { color: var(--blue-300); }
  .chip-post   { background: var(--post-dark); }  .chip-post + .user-arrow   { color: var(--post-dark); }
  .poll-option { background: rgba(255, 255, 255, 0.2); }
  .thread-more { background: linear-gradient(to bottom, rgba(38, 38, 42, 0), var(--achromatic-600) 6rem); }
  .thread-more .state-button { --brand-rgb: 255, 185, 87; background: var(--brand); color: var(--on-brand); }
  .picture-backdrop, .picture-block { background: #374151; } /* gray-700 */
  html.state-page body, .share-state.state-not_found, .share-backdrop.state-not_found { background: var(--surface); }
  .share-state.state-app_only, .share-backdrop.state-app_only { background: var(--sky); }
}

/* Right-to-left (Arabic), as in the app: the frame stays left-to-right, so the vote rail
   keeps to the right, and what's inside it follows the reader: the header, the footer,
   a reply's body (a quote's line and label) and poll options. The chip's arrow and its
   raised edge turn round; the original poster's line moves to the leading edge. */
.card[dir="rtl"] .card-header,
.card[dir="rtl"] .card-footer,
.card[dir="rtl"].reply .card-body,
.card[dir="rtl"] .poll-options { direction: rtl; }
.card[dir="rtl"] .user-arrow { transform: scaleX(-1); margin-right: 0; margin-left: 2px; }
.card[dir="rtl"] .user-button { box-shadow: 1px 2px 0 var(--achromatic-200); }
@media (prefers-color-scheme: dark) {
  .card[dir="rtl"] .user-button { box-shadow: 1px 2px 0 var(--achromatic-300); }
}

/* A picture post without a caption has nothing below its label. */
.picture-card .card-body { min-height: 0; }
.picture-card .card-body:not(:has(*)) { display: none; }
