/* ============================================================
   AO3 STUDIO — MASTER WORK SKIN
   Version: 1.28 — Last updated: 2026-05-15
   (1.1: AO3 work-skin sanitizer compatibility — no gap/min()/animation/etc.)
   (1.2: iMessage + skins — AO3 Rich Text injects <p> inside widgets; neutralize + div bubbles)
   (1.3: iMessage — all <p> inside .ios-phone incl. inside .ios-msg; margin !important vs site .userstuff p)
   (1.4: iMessage — composer .ios-input-draft: min-height + flex; undo display:contents on <p> inside draft so pill cannot collapse)
   (1.5: iMessage expand mode — .ios-body flex-grow so .ios-input-bar stays at bottom of phone)
   (1.6: Snapchat — status rows use .sc-in/.sc-out + .sc-red|.sc-purple|.sc-blue; .sc-meta inside .sc-image-container; legacy selectors retained)
   (1.7: Tweet action bar + views/bookmarks; Instagram carousel dots + actions row; Discord reply preview + optional avatars; Reddit flex card row; Tumblr reblog indent via nested blockquotes)
   (1.8: Snapchat / Android / Slack / Discord — scroll vs expand body, typing row, composer draft strip; Discord scroll wrapper + input bar)
   (1.9: Snapchat outgoing rail-first + flush left; Android green bubbles + header avatar row; Tumblr reblog stair-step margin; flat Discord text rows; avatar URL + initial fallbacks — Slack, Forum, Gmail, Instagram, iMessage header)
   (1.10: Snapchat — strip .sc-saved-in/.sc-saved-out borders & padding vs rails; .sc-status margin-top + padding-left align with chat text; .sc-text-cell-out left)
   (1.11: Discord avatar color backgrounds scoped to .dc-avatar only; review avatar initial contrast; Discord/Slack typing row as text; newspaper .np-rule as div-friendly rule line)
   (1.12: AO3 skin save — remove gap/calc/object-fit disallowed by site sanitizer; iMessage header spacing via padding + margins; WhatsApp header avatar without object-fit)
   (1.13: Consolidated AO3 <p> neutralizer — widget roots + flex meta rows; avoids duplicate selectors and preserves composer draft <p> overrides)
   (1.14: Export HTML minified (strip newlines/indent); hide AO3-injected <br> inside flex rows in work skin)
   (1.15: AO3 parser spacing patch — superseded by 1.16 avatar margins + patch removal)
   (1.16: Prose lists + avatar margin-right; Tumblr + AO3 blurb redesign; remove parser patch block)
   (1.17: Robust export alignment; remove universal sibling-margin selectors; Tumblr thread + AO3 blurb card; explicit component margins)
   (1.18: Hide AO3-injected br in Snapchat composer strip, Tumblr thread/nests, AO3 blurb card; QA fixture covers outbound Snapchat saved media + multiline pill + long Tumblr + many-tag blurb)
   (1.24: Snapchat redesign — real-app fidelity; AO3 fic card removed; CSS vars + dark-mode support)
   (1.25: AO3 sanitizer compat — inline var() values, drop :root, replace calc() in Snapchat; dark mode via @media literal overrides)
   (1.26: AO3 sanitizer compat + Snapchat yellow header + left-aligned name; Slack typing darker; Newspaper always light; Sticky dark override softened)
   (1.27: Snapchat case-3 fix — .sc-text-cell p display:block override; dropped @media prefers-color-scheme blocks to fix OS-dark-but-AO3-light edge case)
   (1.28: editor preview now renders through sanitizer + AO3 baseline — true WYSIWYG)
   ============================================================
   HOW TO USE:
   1. Go to archiveofourown.org → Dashboard → Skins → My Work Skins
   2. Click "Create Work Skin" and give it a name (e.g. "AO3 Studio")
   3. Paste this entire block into the CSS field and save
   4. When posting a fic, go to Edit Work → Associations → Select Work Skin
   You only ever need to do step 1–3 ONCE. Reuse this skin across all your fics.
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────────
   (1.25) AO3's CSS sanitizer strips :root, var(), and calc(), so the
   1.24 token system has been inlined: every reference now uses the
   literal light-mode value (#ffffff, #f8fafc, #1a1a1a, #64748b, #e2e8f0).
   (1.27) Dark-mode @media overrides were removed — prefers-color-scheme
   reads the OS, not AO3's site skin (Reversi), so OS-dark + AO3-light users
   saw inverted renders on light pages. All skins now render light-only
   until we can detect AO3 Reversi explicitly. */

/* ── UNIVERSAL HELPERS ─────────────────────────────────────── */
#workskin .userstuff > p,
#workskin > p { margin-bottom: 1em; }
#workskin .userstuff > p + p,
#workskin > p + p { margin-top: 1em; }
#workskin .userstuff > p:last-child,
#workskin > p:last-child { margin-bottom: 0; }

#workskin .sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

#workskin .align-center  { text-align: center; }
#workskin .align-right   { text-align: right; }
#workskin .align-justify { text-align: justify; }

#workskin ul, #workskin ol { margin: 1em 0 1em 2.5em !important; padding: 0 !important; }
#workskin li > p { display: inline !important; margin: 0 !important; }

/* Vertical / horizontal gaps after removing universal sibling-margin selectors */
#workskin .wa-body > *:not(:first-child) { margin-top: 4px; }
#workskin .sc-body > *:not(:first-child) { margin-top: 12px; }
#workskin .android-chat-body > *:not(:first-child) { margin-top: 8px; }
#workskin .sl-channel-hash { margin-right: 4px; }
#workskin .dc-channel-icon { margin-right: 8px; }
#workskin .fb-reaction-icons > *:not(:first-child) { margin-left: -4px; }
#workskin .sc-status > span + span { margin-left: 6px; }
#workskin .tw-bar-btn .tw-bar-num { margin-left: 4px; }
#workskin .bsky-stat > span + span { margin-left: 5px; }

#workskin .small-note { font-size: 0.85em; color: #555; }
#workskin .code { font-family: monospace; font-size: 0.9em; }
#workskin img.responsive-img { max-width: 100%; width: auto; height: auto; }
#workskin details summary { cursor: pointer; font-weight: 600; }

/* ── iOS iMESSAGE ──────────────────────────────────────────── */
#workskin .ios-phone {
  min-width: 320px;
  max-width: 350px;
  min-height: 520px;
  margin: 20px auto;
  border: 1px solid #ddd;
  border-radius: 30px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
#workskin .ios-phone .ios-header {
  flex-shrink: 0;
}
#workskin .ios-phone .ios-input-bar {
  flex-shrink: 0;
}
#workskin .ios-header {
  background: #f9f9f9;
  /* Extra left inset so centered title block clears the absolute back arrow (AO3 disallows calc() on max-width for .ios-header-main) */
  padding: 12px 15px 12px 44px;
  border-bottom: 1px solid #e5e5ea;
  font-weight: 600;
  font-size: 16px;
  position: relative;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
}
#workskin .ios-back-arrow { position: absolute; left: 15px; color: #007aff; font-size: 18px; line-height: 1; }
#workskin .ios-header-main {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
}
#workskin .ios-header-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e5e5ea; color: #000; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; overflow: hidden; margin-right: 10px; }
#workskin .ios-header-avatar-hasimg {
  padding: 0;
  background: #d1d1d6;
}
#workskin .ios-header-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .ios-header-title { display: inline-block; max-width: 100%; text-align: left; }
#workskin .ios-body {
  padding: 16px 15px 18px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#workskin .ios-phone--body-expand .ios-body {
  /* Grow into space below header so composer stays at frame bottom; flex-shrink0 keeps full thread height */
  flex: 1 0 auto;
  max-height: none;
  overflow-y: visible;
}
#workskin .ios-phone--body-scroll .ios-body {
  flex: 1 1 auto;
  min-height: 0;
  /* AO3 disallows min() in property values — fixed cap only */
  max-height: 480px;
  overflow-y: auto;
}
#workskin .ios-phone--body-scroll {
  max-height: 780px;
}
/* iMessage: default gap between turns; tight stack same side (1:1) */
#workskin .ios-body > .ios-msg-block + .ios-msg-block {
  margin-top: 8px;
}
#workskin .ios-body > .ios-msg-block.ios-align-start + .ios-msg-block.ios-align-start,
#workskin .ios-body > .ios-msg-block.ios-align-end + .ios-msg-block.ios-align-end {
  margin-top: 2px;
}
/* Grouped bubble corners: second block in a same-side stack */
#workskin .ios-body > .ios-msg-block.ios-align-start + .ios-msg-block.ios-align-start .ios-received {
  border-top-left-radius: 4px;
}
#workskin .ios-body > .ios-msg-block.ios-align-end + .ios-msg-block.ios-align-end .ios-sent-blue,
#workskin .ios-body > .ios-msg-block.ios-align-end + .ios-msg-block.ios-align-end .ios-sent-green {
  border-top-right-radius: 4px;
}
#workskin .ios-msg {
  padding: 9px 14px;
  border-radius: 20px;
  max-width: 75%;
  width: fit-content;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  word-wrap: break-word;
  box-sizing: border-box;
}
#workskin .ios-received {
  background: #e9e9eb;
  color: #000000;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
#workskin .ios-sent-blue {
  background: #007aff;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
#workskin .ios-sent-green {
  background: #34c759;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
#workskin .ios-msg-block {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
}
#workskin .ios-msg-block.ios-align-start { align-items: flex-start; }
#workskin .ios-msg-block.ios-align-end { align-items: flex-end; }
#workskin .ios-read-receipt {
  font-size: 11px;
  color: #8e8e93;
  margin-top: 2px;
  padding-right: 2px;
}
#workskin .ios-typing-bubble {
  background: #e9e9eb;
  border-radius: 18px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  border-bottom-left-radius: 4px;
}
/* AO3 disallows gap — space typing dots with sibling margins */
#workskin .ios-typing-bubble .ios-typing-dot + .ios-typing-dot { margin-left: 4px; }
#workskin .ios-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8e8e93;
  display: inline-block;
  opacity: 0.75;
}
#workskin .ios-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  min-height: 52px;
  box-sizing: border-box;
  border-top: 1px solid #e5e5ea;
  background: #f9f9f9;
}
#workskin .ios-input-draft {
  border: 1px solid #c8c8cc;
  border-radius: 20px;
  padding: 8px 15px;
  flex-grow: 1;
  background: #fff;
  color: #333;
  font-size: 15px;
  line-height: 1.35;
  min-height: 40px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
/* If AO3 wraps draft text in <p>, the widget neutralizer (e.g. #workskin .ios-phone p { display:contents }) would
   collapse this pill to ~border+padding height — keep a real box here. */
#workskin .ios-input-draft p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#workskin .ios-draft-text {
  line-height: 1.35;
  display: block;
}
#workskin .ios-send-btn {
  background: #007aff;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  font-weight: bold;
}
#workskin .hide { display: none; }

/* Neutralize AO3's automatic <p> tag wrapper injection which breaks flex layouts */
#workskin .ios-phone p,
#workskin .whatsapp-chat p,
#workskin .snapchat-chat p,
#workskin .android-chat p,
#workskin .slack-chat p,
#workskin .discord-chat p,
#workskin .tweet-container p,
#workskin .bluesky-post p,
#workskin .facebook-post p,
#workskin .instagram-post p,
#workskin .reddit-post p,
#workskin .tumblr-post p,
#workskin .tumblr-thread p,
#workskin .sticky-note p,
/* Target specific flex rows for prose-heavy skins to preserve their actual body paragraphs */
#workskin .review-user p,
#workskin .review-header p,
#workskin .review-meta p,
#workskin .g-avatar-col p,
#workskin .g-meta-row p,
#workskin .g-to p,
#workskin .fp-info p,
#workskin .fp-meta p,
#workskin .np-publication p,
#workskin .np-dateline p,
#workskin .np-headline p,
#workskin .np-subheadline p,
#workskin .np-byline p {
  margin: 0 !important;
  padding: 0 !important;
  display: contents;
}

/* (1.27) AO3 injects <p> inside .sc-text-cell — neutralize but keep block flow so text is visible. */
#workskin .sc-text-cell p,
#workskin .sc-text-cell-in p,
#workskin .sc-text-cell-out p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Safeguard: Hide AO3-injected <br> tags inside flex layouts */
#workskin .ios-body > br, #workskin .ios-msg-block > br, #workskin .ios-header-main > br,
#workskin .wa-body > br, #workskin .wa-msg > br, #workskin .wa-header > br,
#workskin .sc-body > br, #workskin .sc-msg > br, #workskin .sc-header > br,
#workskin .android-chat-body > br, #workskin .android-header > br,
#workskin .slack-chat-body > br, #workskin .sl-message > br, #workskin .sl-header > br,
#workskin .dc-body > br, #workskin .dc-message > br, #workskin .dc-header-row > br, #workskin .dc-reply > br,
#workskin .tw-header > br, #workskin .tw-action-bar > br, #workskin .tw-stats > br,
#workskin .ig-header > br, #workskin .ig-actions > br,
#workskin .fb-header > br, #workskin .fb-reactions > br, #workskin .fb-actions > br,
#workskin .rdt-thread > br, #workskin .rdt-footer > br, #workskin .rdt-meta-row > br,
#workskin .bsky-header > br, #workskin .bsky-footer > br, #workskin .bsky-stat > br,
#workskin .forum-post > br, #workskin .fp-info > br, #workskin .fp-content > br,
#workskin .review-user > br, #workskin .review-header > br,
#workskin .sc-input-bar > br, #workskin .sc-input-draft > br,
#workskin .tumblr-thread > br, #workskin .tumblr-reblog-nest > br {
  display: none !important;
}
#workskin .ios-phone .ios-header br { display: none; }

/* ── WHATSAPP ──────────────────────────────────────────────── */
#workskin .whatsapp-chat {
  min-width: 360px;
  max-width: 400px;
  min-height: 500px;
  margin: 20px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  background-color: #efeae2;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#workskin .wa-header {
  background-color: #008069;
  color: white;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
#workskin .wa-header-avatar { width: 40px; height: 40px; border-radius: 50%; background-color: #ccc; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
#workskin .wa-header-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .wa-info { display: flex; flex-direction: column; }
#workskin .wa-group-name { font-size: 16px; font-weight: 600; }
#workskin .wa-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  background-color: #e5ddd5;
  background-image:
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.018) 0, rgba(0, 0, 0, 0.018) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.012) 0, rgba(0, 0, 0, 0.012) 1px, transparent 1px, transparent 14px);
}
#workskin .whatsapp-chat--body-expand .wa-body {
  flex: 1 0 auto;
  max-height: none;
  overflow-y: visible;
}
#workskin .whatsapp-chat--body-scroll .wa-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 480px;
  overflow-y: auto;
}
#workskin .whatsapp-chat--body-scroll {
  max-height: 780px;
}
#workskin .wa-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}
#workskin .wa-in { align-self: flex-start; }
#workskin .wa-out { align-self: flex-end; }
#workskin .wa-msg.wa-in { align-items: flex-start; }
#workskin .wa-msg.wa-out { align-items: flex-end; }
#workskin .wa-bubble {
  position: relative;
  padding: 6px 8px 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #111b21;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
#workskin .wa-in .wa-bubble { background-color: #ffffff; border-top-left-radius: 0; }
#workskin .wa-out .wa-bubble { background-color: #dcf8c6; border-top-right-radius: 0; }
#workskin .wa-in + .wa-in .wa-bubble { border-top-left-radius: 8px; }
#workskin .wa-out + .wa-out .wa-bubble { border-top-right-radius: 8px; }
#workskin .wa-sender { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
#workskin .wa-sender.color-pink { color: #e53935; }
#workskin .wa-sender.color-blue { color: #1e88e5; }
#workskin .wa-sender.color-purple { color: #8e24aa; }
#workskin .wa-text-wrap { display: inline-block; }
#workskin .wa-read-receipt {
  font-size: 11px;
  color: #53bdeb;
  margin-top: 2px;
  padding-right: 2px;
  align-self: flex-end;
  line-height: 1;
}
#workskin .wa-read-receipt-ticks {
  letter-spacing: -2px;
  font-size: 12px;
}
#workskin .wa-typing-bubble {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  border-top-left-radius: 0;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
#workskin .wa-typing-bubble .wa-typing-dot + .wa-typing-dot { margin-left: 4px; }
#workskin .wa-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8696a0;
  display: inline-block;
  opacity: 0.85;
}
#workskin .wa-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  min-height: 52px;
  box-sizing: border-box;
  border-top: 1px solid #d1d1d1;
  background: #f0f2f5;
  flex-shrink: 0;
}
#workskin .wa-input-draft {
  border: 1px solid #e9edef;
  border-radius: 20px;
  padding: 8px 14px;
  flex-grow: 1;
  background: #fff;
  color: #111b21;
  font-size: 14px;
  line-height: 1.35;
  min-height: 40px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
#workskin .wa-input-draft p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#workskin .wa-draft-text {
  line-height: 1.35;
  display: block;
}
#workskin .wa-send-btn {
  background: #008069;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

/* ── LETTER (Aged Parchment) ───────────────────────────────── */
/* (1.24) Letter keeps its parchment palette on light backgrounds. On dark
   (AO3 Reversi etc.) it adopts a darker, still warm-toned card so the
   parchment cue survives but the page contrast isn't broken. */
#workskin .letter-wrapper {
  max-width: 580px;
  margin: 20px auto;
  font-family: Georgia, "Times New Roman", serif;
}
#workskin .letter-aged {
  background: #fdf8ee;
  border: 1px solid #c9a84c;
  border-radius: 2px;
  padding: 30px 35px;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.12), inset 0 0 60px rgba(201,168,76,0.05);
  font-size: 15px;
  line-height: 1.6;
  color: #4a3b2c;
}
#workskin .letter-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #c9a84c;
  font-style: italic;
  color: #5a3e1b;
}
#workskin .letter-aged p { margin-bottom: 1em; }
#workskin .letter-footer {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px dashed #c9a84c;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-style: italic;
  color: #5a3e1b;
}
#workskin .letter-signature { font-weight: 700; font-size: 16px; margin-top: 4px; }
#workskin .letter-date {
  font-size: 13px;
  color: #6b5344;
  font-style: italic;
  margin: -8px 0 16px;
  text-align: right;
}
/* ── SPOILER ───────────────────────────────────────────────── */
/* (1.24) Var-driven: matches site surface on Reversi without changing
   the light-mode look. */
#workskin details {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 1em 0;
  overflow: hidden;
}
#workskin details summary {
  padding: 10px 16px;
  background: #f8fafc;
  font-weight: 600;
  font-size: 14px;
  color: #64748b;
  list-style: none;
  user-select: none;
  cursor: pointer;
}
#workskin details summary::-webkit-details-marker { display: none; }
#workskin details summary::before { content: '▶ '; font-size: 11px; }
#workskin details[open] summary::before { content: '▼ '; }
#workskin details p {
  padding: 16px;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
  color: #1a1a1a;
  background: #ffffff;
}

/* ── TUMBLR ────────────────────────────────────────────────── */
/* Authentic Modern Tumblr */
#workskin .tumblr-thread { max-width: 500px; margin: 20px auto; background: #fff; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; overflow: hidden; }
#workskin .tumblr-post { padding: 15px; }
#workskin .tumblr-header { display: flex; align-items: center; margin-bottom: 10px; }
#workskin .tumblr-avatar { width: 36px; height: 36px; border-radius: 3px; background: #c0bdb8; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; margin-right: 10px; }
#workskin .t-url { font-size: 14px; font-weight: bold; color: #000; }
#workskin .tumblr-content { font-size: 15px; line-height: 1.5; color: #000; }
#workskin .tumblr-avatar-img { width: 100%; height: 100%; display: block; }
#workskin blockquote.tumblr-reblog-nest { margin: 15px 0 0 15px; padding-left: 15px; border-left: 3px solid #e5e5e5; }
#workskin blockquote.tumblr-reblog-nest .tumblr-post { padding: 0; }

/* ── TWEET ─────────────────────────────────────────────────── */
#workskin .tweet-container {
  max-width: 500px;
  margin: 20px auto;
  border: 1px solid #cfd9de;
  border-radius: 12px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
}
#workskin .tw-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
#workskin .tw-avatar { width: 40px; height: 40px; border-radius: 50%; background: #cfd9de; flex-shrink: 0; overflow: hidden; margin-right: 10px; }
#workskin .tw-user { display: flex; flex-direction: column; }
#workskin .tw-name  { font-weight: 700; font-size: 15px; color: #0f1419; }
#workskin .tw-handle { font-size: 14px; color: #536471; }
#workskin .tw-body { font-size: 16px; line-height: 1.5; color: #0f1419; margin-bottom: 12px; }
#workskin .tw-footer { border-top: 1px solid #eff3f4; padding-top: 10px; }
#workskin .tw-stats { display: flex; flex-wrap: wrap; }
#workskin .tw-stat  { font-size: 14px; color: #536471; margin-right: 15px; }
#workskin .tw-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid #eff3f4;
  font-size: 16px;
  color: #536471;
}
#workskin .tw-bar-grow {
  flex: 1 1 auto;
  min-width: 8px;
  margin-left: 0;
  margin-right: 0;
}
#workskin .tw-bar-btn {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  margin-right: 25px;
}
#workskin .tw-bar-num { font-size: 12px; font-weight: 700; color: #0f1419; }
#workskin .tw-date {
  font-size: 13px;
  color: #536471;
  margin-top: 2px;
}
#workskin .tw-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
#workskin .tw-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 12px;
  border: 1px solid #eff3f4;
}
/* AO3 disallows gap — use white cell borders as gutters */
#workskin .tw-media-img {
  width: 100%;
  min-height: 120px;
  max-height: 280px;
  display: block;
  box-sizing: border-box;
  border: 1px solid #fff;
}
#workskin .tw-media .tw-media-img:only-child {
  grid-column-start: 1;
  grid-column-end: 3;
  min-height: 160px;
  max-height: 360px;
}

/* ── GMAIL ─────────────────────────────────────────────────── */
#workskin .gmail-container {
  max-width: 600px;
  margin: 20px auto;
  font-family: Arial, sans-serif;
  border: 1px solid #dadce0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
#workskin .g-header {
  padding: 16px 20px 0;
  background: #fff;
}
#workskin .g-subject {
  font-size: 22px;
  font-weight: 400;
  color: #202124;
  margin: 0 0 10px;
}
#workskin .g-email {
  display: flex;
  padding: 12px 20px 20px;
  border-top: 1px solid #dadce0;
}
#workskin .g-avatar-col { flex-shrink: 0; }
#workskin .g-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; overflow: hidden; margin-right: 12px; }
#workskin .g-avatar.gav-blue { background: #1a73e8; }
#workskin .g-avatar-hasimg {
  padding: 0;
  background: #dadce0;
}
#workskin .g-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .g-content-col { flex-grow: 1; min-width: 0; }
#workskin .g-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
#workskin .g-name  { font-weight: 600; font-size: 14px; color: #202124; }
#workskin .g-time  { font-size: 12px; color: #5f6368; white-space: nowrap; }
#workskin .g-to    { font-size: 12px; color: #5f6368; margin-bottom: 12px; }
#workskin .g-body  { font-size: 14px; line-height: 1.7; color: #202124; }
#workskin .g-body p { margin: 0; }

/* =========================================
   SNAPCHAT UNIQUE SKIN (scoped #workskin for AO3)
   Spacing uses sibling margins, not gap (AO3 work-skin sanitizer; see header).
   Text rows: vertical rails + flush copy; pill only when .sc-saved-pill (legacy .sc-bubble retained).
   ========================================= */

#workskin .snapchat-chat {
  max-width: 360px;
  min-height: 420px;
  margin: 20px auto;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eaeaea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#workskin .snapchat-chat .sc-header {
  flex-shrink: 0;
}
#workskin .snapchat-chat--body-expand .sc-body {
  flex: 1 0 auto;
  max-height: none;
  overflow-y: visible;
  min-height: 0;
}
#workskin .snapchat-chat--body-scroll .sc-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 480px;
  overflow-y: auto;
}
#workskin .snapchat-chat--body-scroll {
  max-height: 720px;
}
#workskin .sc-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  min-height: 48px;
  box-sizing: border-box;
  border-top: 1px solid #eaeaea;
  background: #f7f7f7;
  flex-shrink: 0;
}
#workskin .sc-input-draft {
  border: 1px solid #ddd;
  border-radius: 18px;
  padding: 6px 12px;
  flex-grow: 1;
  background: #fff;
  color: #000;
  font-size: 13px;
  line-height: 1.35;
  min-height: 36px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
#workskin .sc-input-draft p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#workskin .sc-draft-text {
  line-height: 1.35;
  display: block;
  color: #888;
}
#workskin .sc-send-btn {
  background: #fffc00;
  color: #000;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-weight: bold;
  flex-shrink: 0;
}
/* (1.24) Camera-style send button keeps Snapchat yellow — yellow is reserved
   for the camera/logo, not the chat body. */
#workskin .sc-typing-bubble {
  background: #eceff1;
  border-radius: 16px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
}
#workskin .sc-typing-bubble .sc-typing-dot + .sc-typing-dot { margin-left: 4px; }
#workskin .sc-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aeb4bc;
  display: inline-block;
  opacity: 0.85;
}

/* (1.26) Snapchat yellow header, left-aligned name next to bitmoji avatar. */
#workskin .sc-header {
  background: #fffc00;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: none;
}

#workskin .sc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 12px;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 20px;
  color: #000000;
}

#workskin .sc-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}

#workskin .sc-name {
  color: #000000;
  font-weight: 500;
  font-size: 15px;
  flex: 0 1 auto;
}

/* (1.24) Body: plain white, no yellow tint anywhere — yellow is reserved for the camera/logo. */
#workskin .sc-body {
  background: #ffffff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
/* (1.24) Vertical breathing room replaces the absent bubble outlines. */
#workskin .sc-body > .sc-msg + .sc-msg { margin-top: 13px; }

#workskin .sc-msg {
  display: flex;
  width: 100%;
}

#workskin .sc-in { justify-content: flex-start; }
#workskin .sc-out { justify-content: flex-start; }

/* (1.24) Modern text rows: 4px colored rail + flush copy, no background, no bubble. */
#workskin .sc-msg.sc-text-row {
  align-items: stretch;
}
#workskin .sc-rail {
  width: 4px;
  flex-shrink: 0;
  border-radius: 2px;
  align-self: stretch;
  min-height: 1.25em;
}
/* (1.24) Real Snapchat rail colors:
   - Inbound text → red
   - Outbound text → blue
   - No-audio / disappeared media marker → purple */
#workskin .sc-rail-incoming {
  background: #ff3a3a;
  margin-right: 10px;
}
#workskin .sc-rail-chat-out {
  background: #4798ff;
  margin-left: 0;
  margin-right: 10px;
}
#workskin .sc-rail-photo {
  background: #8a2be2;
}
#workskin .sc-text-cell {
  /* (1.25) Dropped max-width: calc(100% - 14px) — AO3 sanitizer disallows
     calc() on max-width. flex: 1 1 auto + min-width: 0 already prevents
     overflow inside the .sc-msg flex row (4px rail + 10px gap = the same
     14px the calc reserved). */
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  padding: 0;
}
#workskin .sc-text-cell-in,
#workskin .sc-text-cell-out {
  text-align: left;
}
#workskin .sc-plain-text {
  font-size: 14px;
  line-height: 1.45;
  color: #000000;
  text-align: inherit;
}
/* (1.24) Saved-message marker: tiny inline pill, no heavy bg. Mirrors the real
   Snapchat inline "Saved" tag that appears in chat. */
#workskin .sc-saved-pill {
  display: inline-block;
  max-width: 100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
  text-align: inherit;
  font-size: 13px;
  color: #555555;
}

#workskin .sc-msg.sc-msg-media-row {
  align-items: flex-start;
}
#workskin .sc-msg.sc-msg-media-row.sc-in .sc-rail {
  margin-right: 10px;
}
#workskin .sc-msg.sc-msg-media-row.sc-out .sc-rail {
  margin-left: 0;
  margin-right: 10px;
}

/* Legacy pill bubbles (pre–rail redesign HTML) */
#workskin .sc-bubble {
  padding: 10px 14px;
  max-width: 75%;
  font-size: 14px;
  line-height: 1.4;
}
#workskin .sc-in .sc-bubble {
  background: #f3f4f6;
  color: #000000;
  border-radius: 20px 20px 20px 4px;
}
#workskin .sc-out .sc-bubble {
  background: #00a6ff;
  color: #ffffff;
  border-radius: 20px 20px 4px 20px;
}

#workskin .sc-saved-in,
#workskin .sc-saved-out {
  border: none !important;
  padding: 0 !important;
  box-sizing: border-box;
}

#workskin .sc-image-container {
  max-width: 75%;
  display: flex;
  flex-direction: column;
}

#workskin .sc-snap-img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
}

#workskin .sc-meta {
  font-size: 11px;
  color: #888888;
  margin-top: 6px;
  margin-left: 4px;
}
#workskin .sc-msg.sc-msg-saved-image.sc-out .sc-meta {
  margin-left: 0;
  margin-right: 4px;
  align-self: flex-end;
  text-align: right;
}

/* (1.24) Status rows: tiny grey uppercase caps, real-Snapchat style. */
#workskin .sc-msg.sc-status {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #8e8e93;
  margin-top: 4px;
  padding-left: 14px;
  box-sizing: border-box;
}
#workskin .sc-status-out { justify-content: flex-end; }
#workskin .sc-status-in { justify-content: flex-start; }

/* (1.24) Per-snap-type color modifiers are kept as inline accents but desaturated
   to the muted grey treatment real Snapchat uses outside the rail. */
#workskin .photo-snap,
#workskin .sc-red,
#workskin .video-snap,
#workskin .sc-purple,
#workskin .chat-snap,
#workskin .sc-blue,
#workskin .sc-grey { color: #8e8e93; }

#workskin .sc-status-icon,
#workskin .sc-icon-hollow-arrow,
#workskin .sc-icon-solid-arrow,
#workskin .sc-icon-hollow-square {
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

/* ── CHATROOM / SLACK ──────────────────────────────────────── */
#workskin .slack-chat {
  max-width: 600px;
  min-height: 320px;
  margin: 20px auto;
  font-family: "Slack-Lato", "appleLogo", sans-serif, -apple-system;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
}
#workskin .slack-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
#workskin .slack-chat--body-expand .slack-chat-body {
  flex: 1 0 auto;
  max-height: none;
  overflow-y: visible;
}
#workskin .slack-chat--body-scroll .slack-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 480px;
  overflow-y: auto;
}
#workskin .slack-chat--body-scroll {
  max-height: 720px;
}
#workskin .slack-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  min-height: 48px;
  box-sizing: border-box;
  border-top: 1px solid #ddd;
  background: #f8f8f8;
  flex-shrink: 0;
}
#workskin .slack-input-draft {
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 6px 12px;
  flex-grow: 1;
  background: #fff;
  color: #1d1c1d;
  font-size: 13px;
  line-height: 1.35;
  min-height: 36px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
#workskin .slack-input-draft p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#workskin .slack-draft-text { color: #616061; display: block; }
#workskin .slack-send-btn {
  background: #007a5a;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-weight: bold;
  flex-shrink: 0;
}
#workskin .sl-typing-row {
  padding: 4px 16px 8px;
  color: #1d1c1d;
  font-size: 13px;
}
#workskin .sl-typing-row i { color: #1d1c1d; }
#workskin .sl-typing-bubble {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
}
#workskin .sl-typing-bubble .sl-typing-dot + .sl-typing-dot { margin-left: 4px; }
#workskin .sl-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #616061;
  display: inline-block;
  opacity: 0.85;
}
#workskin .sl-channel-bar {
  background: #611f69;
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}
#workskin .sl-channel-hash { opacity: 0.85; }
#workskin .sl-channel-name { letter-spacing: 0.02em; }
#workskin .slack-chat-body > .sl-message {
  padding-left: 16px;
  padding-right: 16px;
}
#workskin .slack-chat-body > .sl-message:first-child { padding-top: 12px; }
#workskin .slack-chat-body > .sl-message:last-child { padding-bottom: 12px; }
#workskin .sl-message {
  display: flex;
  padding: 4px 0;
}
#workskin .sl-avatar { width: 36px; height: 36px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0; overflow: hidden; margin-right: 10px; }
#workskin .sl-avatar-hasimg {
  padding: 0;
}
#workskin .sl-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .sl-av-blue   { background: #1264a3; }
#workskin .sl-av-pink   { background: #e01e5a; }
#workskin .sl-av-purple { background: #6b2fa0; }
#workskin .sl-av-green  { background: #2eb67d; }
#workskin .sl-text { flex-grow: 1; }
#workskin .sl-header { display: flex; align-items: baseline; margin-bottom: 2px; }
#workskin .sl-author    { font-weight: 700; font-size: 14px; color: #1d1c1d; }
#workskin .sl-timestamp { font-size: 12px; color: #616061; margin-left: 8px; }
#workskin .sl-content   { font-size: 14px; color: #1d1c1d; line-height: 1.5; }

/* ── ANDROID SMS ───────────────────────────────────────────── */
#workskin .android-chat {
  max-width: 360px;
  min-height: 280px;
  margin: 20px auto;
  background: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: Roboto, "Google Sans", sans-serif;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
}
#workskin .android-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 3px solid #0F9D58;
  flex-shrink: 0;
}
#workskin .android-header-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e8eaed; color: #202124; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; overflow: hidden; box-shadow: 0 0 0 2px #0F9D58; margin-right: 12px; }
#workskin .android-header-avatar-hasimg {
  padding: 0;
  background: #dadce0;
}
#workskin .android-header-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .android-header-name {
  font-weight: 600;
  font-size: 16px;
  color: #202124;
}
#workskin .android-chat-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
#workskin .android-chat--body-expand .android-chat-body {
  flex: 1 0 auto;
  max-height: none;
  overflow-y: visible;
}
#workskin .android-chat--body-scroll .android-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 480px;
  overflow-y: auto;
}
#workskin .android-chat--body-scroll {
  max-height: 680px;
}
#workskin .android-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  min-height: 48px;
  box-sizing: border-box;
  border-top: 1px solid #ddd;
  background: #f1f3f4;
  flex-shrink: 0;
}
#workskin .android-input-draft {
  border: 1px solid #dadce0;
  border-radius: 18px;
  padding: 6px 12px;
  flex-grow: 1;
  background: #fff;
  color: #202124;
  font-size: 14px;
  line-height: 1.35;
  min-height: 36px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
#workskin .android-input-draft p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#workskin .android-draft-text { color: #5f6368; display: block; }
#workskin .android-send-btn {
  background: #1a73e8;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-weight: bold;
  flex-shrink: 0;
}
#workskin .android-typing-row {
  padding: 0 16px 8px;
}
#workskin .android-typing-bubble {
  background: #f1f3f4;
  border-radius: 18px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
}
#workskin .android-typing-bubble .android-typing-dot + .android-typing-dot { margin-left: 4px; }
#workskin .android-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5f6368;
  display: inline-block;
  opacity: 0.85;
}
#workskin .android-chat .message {
  padding: 10px 14px;
  border-radius: 18px;
  max-width: 75%;
  font-size: 14px;
  line-height: 1.4;
  width: fit-content;
}
#workskin .android-chat .message.in  {
  background: #f1f3f4;
  color: #202124;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
#workskin .android-chat .message.out {
  background: #0F9D58;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* ── REVIEW ────────────────────────────────────────────────── */
/* (1.24) Var-driven surface; star/title/meta accent colors stay fixed. */
#workskin .review-box {
  max-width: 500px;
  margin: 20px auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#workskin .review-user {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
#workskin .review-avatar { width: 36px; height: 36px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; margin-right: 10px; }
#workskin .review-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .review-username { font-weight: 700; font-size: 15px; color: #1a1a1a; }
#workskin .review-header {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
#workskin .review-stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }
#workskin .review-title { font-size: 13px; color: #64748b; margin-left: 10px; }
#workskin .review-meta  { font-size: 12px; color: #64748b; margin-bottom: 10px; }
#workskin .review-body  { font-size: 14px; line-height: 1.6; color: #1a1a1a; }

/* ── GMAIL: missing .g-sender-info rule ─────────────────────── */
#workskin .g-sender-info { display: flex; align-items: center; flex: 1; min-width: 0; }

/* ── DISCORD ───────────────────────────────────────────────── */
#workskin .discord-chat {
  max-width: 600px;
  min-height: 360px;
  margin: 20px auto;
  background: #313338;
  border-radius: 8px;
  overflow: hidden;
  font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #dbdee1;
  display: flex;
  flex-direction: column;
}
#workskin .dc-header {
  background: #2b2d31;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1e1f22;
}
#workskin .dc-channel-icon { color: #80848e; font-size: 18px; font-weight: 700; }
#workskin .dc-channel-name { font-weight: 600; color: #f2f3f5; font-size: 15px; }
#workskin .dc-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 0 8px;
}
#workskin .discord-chat--body-expand .dc-scroll {
  flex: 1 0 auto;
  max-height: none;
  overflow-y: visible;
}
#workskin .discord-chat--body-scroll .dc-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 480px;
  overflow-y: auto;
}
#workskin .discord-chat--body-scroll {
  max-height: 720px;
}
#workskin .dc-body { padding: 0; display: flex; flex-direction: column; }
#workskin .dc-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  min-height: 48px;
  box-sizing: border-box;
  border-top: 1px solid #1e1f22;
  background: #2b2d31;
  flex-shrink: 0;
}
#workskin .dc-input-draft {
  border: 1px solid #1e1f22;
  border-radius: 16px;
  padding: 6px 12px;
  flex-grow: 1;
  background: #383a40;
  color: #dbdee1;
  font-size: 14px;
  line-height: 1.35;
  min-height: 36px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
#workskin .dc-input-draft p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}
#workskin .dc-draft-text { color: #949ba4; display: block; }
#workskin .dc-send-btn {
  background: #5865f2;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-weight: bold;
  flex-shrink: 0;
}
#workskin .dc-typing-row {
  padding: 4px 16px 8px;
  color: #dbdee1;
  font-size: 13px;
  line-height: 1.35;
}
#workskin .dc-typing-row i { color: #dbdee1; }
#workskin .dc-typing-bubble {
  background: #383a40;
  border-radius: 12px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
}
#workskin .dc-typing-bubble .dc-typing-dot + .dc-typing-dot { margin-left: 4px; }
#workskin .dc-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #949ba4;
  display: inline-block;
  opacity: 0.85;
}
#workskin .dc-message {
  padding: 2px 16px;
  display: flex;
  line-height: 1.4;
  background: transparent;
  border-radius: 0;
}
#workskin .dc-message:hover { background: transparent; }
#workskin .dc-message.dc-first { margin-top: 16px; }
#workskin .dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; margin-top: 2px; margin-right: 12px; }
#workskin .dc-avatar-placeholder { width: 40px; flex-shrink: 0; }
#workskin .dc-avatar.dc-avatar-hasimg {
  padding: 0;
  overflow: hidden;
  background: #36393f;
}
#workskin .dc-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .dc-reply {
  display: flex;
  align-items: flex-start;
  margin: 2px 0 8px 0;
  padding: 4px 0 2px 8px;
  border-left: 3px solid #4e5058;
  border-radius: 0 0 0 2px;
}
#workskin .dc-reply > div { margin-right: 8px; }
#workskin .dc-reply-av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  background: #5865f2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  overflow: hidden;
}
#workskin .dc-reply-av-img {
  padding: 0;
  background: #36393f;
}
#workskin .dc-reply-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .dc-reply-body {
  flex: 1;
  min-width: 0;
  font-size: 0.8em;
  color: #b5bac1;
}
#workskin .dc-reply-user {
  display: block;
  font-weight: 600;
  color: #00a8fc;
  margin-bottom: 2px;
}
#workskin .dc-reply-snippet {
  display: block;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#workskin .dc-avatar.dc-av-blue   { background: #5865f2; }
#workskin .dc-avatar.dc-av-green  { background: #57f287; color: #000; }
#workskin .dc-avatar.dc-av-red    { background: #ed4245; }
#workskin .dc-avatar.dc-av-yellow { background: #fee75c; color: #000; }
#workskin .dc-avatar.dc-av-purple { background: #9b59b6; }
#workskin .dc-avatar.dc-av-pink   { background: #eb459e; }
#workskin .dc-content { flex: 1; min-width: 0; }
#workskin .dc-header-row { display: flex; align-items: baseline; margin-bottom: 4px; }
#workskin .dc-username { font-weight: 500; color: #f2f3f5; }
#workskin .dc-username.dc-av-blue   { color: #7289da; }
#workskin .dc-username.dc-av-green  { color: #57f287; }
#workskin .dc-username.dc-av-red    { color: #ed4245; }
#workskin .dc-username.dc-av-yellow { color: #fee75c; }
#workskin .dc-username.dc-av-purple { color: #9b59b6; }
#workskin .dc-username.dc-av-pink   { color: #eb459e; }
#workskin .dc-timestamp { font-size: 0.75em; color: #80848e; margin-left: 8px; }
#workskin .dc-text {
  color: #dbdee1;
  word-wrap: break-word;
  background: transparent;
  border-radius: 0;
}
#workskin .dc-system {
  padding: 4px 16px;
  font-size: 0.875em;
  color: #80848e;
  font-style: italic;
  text-align: center;
}

/* ── REDDIT ────────────────────────────────────────────────── */
/* (1.24) Var-driven surface + body text. Vote/author/stat greys stay as
   stable Reddit greys (they read fine on either background). */
#workskin .reddit-post {
  max-width: 600px;
  margin: 20px auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
#workskin .rdt-thread {
  display: flex;
  align-items: stretch;
}
#workskin .rdt-vote-col {
  flex: 0 0 44px;
  width: 44px;
  background: #f8fafc;
  padding: 12px 6px;
  text-align: center;
  box-sizing: border-box;
  border-right: 1px solid #e2e8f0;
}
#workskin .rdt-vote-btn { color: #878a8c; font-size: 18px; line-height: 1; cursor: default; display: block; }
#workskin .rdt-score { font-size: 12px; font-weight: 700; color: #1a1a1a; margin: 2px 0; }
#workskin .rdt-content {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 0;
  padding: 12px 14px 14px;
}
#workskin .rdt-meta-row { font-size: 12px; color: #64748b; margin-bottom: 6px; }
#workskin .rdt-sub { font-weight: 700; color: #1a1a1a; }
#workskin .rdt-author { color: #64748b; }
#workskin .rdt-title { font-size: 18px; font-weight: 500; color: #1a1a1a; margin-bottom: 8px; line-height: 1.3; }
#workskin .rdt-body { font-size: 14px; color: #1a1a1a; line-height: 1.6; margin-bottom: 8px; }
#workskin .rdt-footer { display: flex; font-size: 12px; color: #64748b; padding-top: 6px; border-top: 1px solid #e2e8f0; }
#workskin .rdt-footer > span { margin-right: 14px; }
#workskin .rdt-stat { font-weight: 700; }
#workskin .rdt-comments { clear: both; border-top: 1px solid #e2e8f0; padding: 8px; }
#workskin .rdt-comment { padding: 6px 0 6px 12px; border-left: 2px solid #e2e8f0; margin-bottom: 6px; }
#workskin .rdt-comment-header { font-size: 12px; color: #64748b; margin-bottom: 4px; }
#workskin .rdt-comment-username { font-weight: 700; color: #0079d3; }
#workskin .rdt-comment-body { font-size: 14px; color: #1a1a1a; line-height: 1.5; }

/* ── BLUESKY ───────────────────────────────────────────────── */
#workskin .bluesky-post {
  max-width: 500px;
  margin: 20px auto;
  border: 1px solid #e1e8ed;
  border-radius: 12px;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
}
#workskin .bsky-header { display: flex; align-items: center; margin-bottom: 10px; }
#workskin .bsky-user-info { margin-left: 10px; }
#workskin .bsky-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #0085ff;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff;
  overflow: hidden;
}
#workskin .bsky-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .bsky-user-info { flex: 1; min-width: 0; }
#workskin .bsky-name  { font-weight: 700; font-size: 15px; color: #0f1419; display: block; }
#workskin .bsky-handle { font-size: 14px; color: #687684; display: block; }
#workskin .bsky-logo { margin-left: auto; color: #0085ff; font-size: 22px; font-weight: 900; }
#workskin .bsky-body { font-size: 16px; line-height: 1.5; color: #0f1419; margin-bottom: 12px; }
#workskin .bsky-date { font-size: 13px; color: #687684; margin-bottom: 10px; }
#workskin .bsky-footer {
  display: flex;
  border-top: 1px solid #e1e8ed;
  padding-top: 10px;
  font-size: 14px; color: #687684;
}
#workskin .bsky-stat { display: flex; align-items: center; margin-right: 20px; }

/* ── NEWSPAPER ARTICLE ─────────────────────────────────────── */
/* (1.26) Always light: real newspapers are white paper with black ink and
   should not flip with OS/site dark mode. Literal hex (not --ws-* vars) so
   the rendering is identical regardless of theme. */
#workskin .newspaper-wrap {
  max-width: 600px;
  margin: 20px auto;
  font-family: 'Times New Roman', Times, Georgia, serif;
  border: 2px solid #1a1a1a;
  padding: 24px 28px;
  background: #ffffff;
}
#workskin .np-publication {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 3px double #1a1a1a;
  padding-bottom: 6px;
  margin-bottom: 8px;
}
#workskin .np-dateline {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
#workskin .np-headline {
  font-size: 2em;
  font-weight: 900;
  line-height: 1.1;
  color: #1a1a1a;
  margin-bottom: 8px;
}
#workskin .np-subheadline {
  font-size: 1.1em;
  font-weight: 400;
  font-style: italic;
  color: #1a1a1a;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a1a;
}
#workskin .np-byline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 12px;
}
#workskin .np-body { font-size: 15px; line-height: 1.7; color: #1a1a1a; }
#workskin .np-body p { margin-bottom: 1em; text-indent: 1.5em; }
#workskin .np-body p:first-child { text-indent: 0; }
#workskin .np-rule { border: none; border-top: 1px solid #1a1a1a; margin: 12px 0; }

/* ── FORUM / BBS THREAD ────────────────────────────────────── */
/* (1.24) Var-driven surface/text. Header blue + accent blue links are
   intentional forum chrome and stay fixed. */
#workskin .forum-thread {
  max-width: 650px;
  margin: 20px auto;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}
#workskin .forum-header {
  background: #2a5174;
  color: #fff;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}
#workskin .forum-post { display: flex; border-top: 1px solid #e2e8f0; }
#workskin .forum-post:first-of-type { border-top: none; }
#workskin .fp-info {
  width: 120px;
  flex-shrink: 0;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 10px 8px;
  text-align: center;
}
#workskin .fp-avatar {
  width: 56px; height: 56px;
  border-radius: 4px;
  background: #c0cdd5;
  margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  overflow: hidden;
}
#workskin .fp-avatar-hasimg {
  padding: 0;
  background: #b0bec5;
}
#workskin .fp-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .fp-username { font-weight: 700; font-size: 13px; color: #2a5174; margin-bottom: 3px; }
#workskin .fp-role     { font-size: 11px; color: #64748b; font-style: italic; }
#workskin .fp-post-count { font-size: 11px; color: #64748b; margin-top: 4px; }
#workskin .fp-content  { flex: 1; min-width: 0; padding: 10px 12px; }
#workskin .fp-meta     { font-size: 11px; color: #64748b; margin-bottom: 8px; display: flex; justify-content: space-between; }
#workskin .fp-post-num { font-weight: 700; color: #2a5174; }
#workskin .fp-body     { line-height: 1.6; color: #1a1a1a; }
#workskin .fp-body p   { margin-bottom: 0.8em; }
#workskin .fp-sig      { margin-top: 12px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 11px; color: #64748b; font-style: italic; }

/* ── FACEBOOK POST ─────────────────────────────────────────── */
#workskin .facebook-post {
  max-width: 500px;
  margin: 20px auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  overflow: hidden;
}
#workskin .fb-header { display: flex; align-items: center; padding: 12px 16px 8px; }
#workskin .fb-avatar { width: 40px; height: 40px; border-radius: 50%; background: #1877f2; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; overflow: hidden; margin-right: 10px; }
#workskin .fb-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .fb-user-info { flex: 1; }
#workskin .fb-name { font-weight: 700; font-size: 15px; color: #050505; display: block; }
#workskin .fb-meta { font-size: 12px; color: #65676b; display: block; }
#workskin .fb-body { padding: 4px 16px 12px; font-size: 15px; line-height: 1.5; color: #050505; }
#workskin .fb-reactions { padding: 8px 16px; border-top: 1px solid #e4e6eb; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #65676b; }
#workskin .fb-reaction-icons { display: flex; }
#workskin .fb-reaction-count { }
#workskin .fb-actions { display: flex; border-top: 1px solid #e4e6eb; }
#workskin .fb-action-btn { flex: 1; padding: 8px; text-align: center; font-size: 14px; font-weight: 700; color: #65676b; }

/* ── STICKY NOTE ───────────────────────────────────────────── */
/* (1.27) Light-only; the previous dark @media override was removed because
   prefers-color-scheme reflects OS state, not AO3's site skin. */
#workskin .sticky-note {
  max-width: 320px;
  margin: 20px auto;
  background: #fff9a3;
  padding: 20px 22px 28px;
  font-family: 'Segoe Script', 'Comic Sans MS', 'Brush Script MT', cursive, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.15), inset 0 -2px 4px rgba(0,0,0,0.05);
  position: relative;
  border-top: 28px solid #f5e642;
  word-wrap: break-word;
}
#workskin .sticky-note.sticky-pink   { background: #ffcce5; border-top-color: #ff99cc; }
#workskin .sticky-note.sticky-blue   { background: #cce5ff; border-top-color: #99caff; }
#workskin .sticky-note.sticky-green  { background: #ccf0c8; border-top-color: #99dd94; }
#workskin .sticky-note.sticky-orange { background: #ffe5b4; border-top-color: #ffcc80; }
#workskin .sticky-body { }

/* ── INSTAGRAM POST ────────────────────────────────────────── */
#workskin .instagram-post {
  max-width: 468px;
  margin: 20px auto;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}
#workskin .ig-header { display: flex; align-items: center; padding: 12px; }
#workskin .ig-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0; overflow: hidden; margin-right: 10px; }
#workskin .ig-avatar-hasimg {
  padding: 0;
  background: #ddd;
}
#workskin .ig-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .ig-username  { font-weight: 700; font-size: 14px; color: #262626; flex: 1; }
#workskin .ig-more      { color: #262626; font-size: 18px; }
/* Square crop uses wrapper .ig-image-wrap (see builders); AO3 disallows aspect-ratio/object-fit */
#workskin .ig-image-wrap {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  background: #efefef;
}
#workskin .ig-image-wrap .ig-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#workskin .ig-image-placeholder {
  width: 100%;
  min-height: 280px;
  background: #efefef;
  display: flex; align-items: center; justify-content: center;
  color: #8e8e8e; font-size: 13px;
}
#workskin .ig-carousel-dots {
  text-align: center;
  padding: 6px 12px 2px;
  line-height: 0;
}
#workskin .ig-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c7c7c7;
  margin: 0 3px;
  vertical-align: middle;
}
#workskin .ig-dot.ig-dot-active {
  background: #0095f6;
}
#workskin .ig-actions {
  padding: 10px 12px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}
#workskin .ig-act-group { display: inline-flex; align-items: center; }
#workskin .ig-act-group > span { margin-right: 14px; }
#workskin .ig-like-count { padding: 0 12px 4px; font-weight: 700; font-size: 14px; color: #262626; }
#workskin .ig-caption   { padding: 0 12px 6px; font-size: 14px; color: #262626; line-height: 1.5; }
#workskin .ig-caption-username { font-weight: 700; }
#workskin .ig-comments  { padding: 0 12px 4px; font-size: 14px; color: #8e8e8e; cursor: default; }
#workskin .ig-date      { padding: 0 12px 12px; font-size: 10px; color: #8e8e8e; text-transform: uppercase; letter-spacing: 0.05em; }

/* (1.27) Dark-mode @media blocks removed.
   prefers-color-scheme reads the OS, not AO3's site skin, so users with
   OS dark mode + AO3 default light got inverted/dimmed renders on light pages.
   Until we can detect AO3 Reversi explicitly, all skins render light-only.
   Phone-frame skins were always light-only by design. */
