:root {
  --fr-bg: #09090b;
  --fr-bg-deep: #030305;
  --fr-paper: #151517;
  --fr-paper-warm: #19191b;
  --fr-ink: #f7f2f7;
  --fr-soft: rgba(247, 242, 247, 0.78);
  --fr-dim: rgba(247, 242, 247, 0.52);
  --fr-line: rgba(247, 242, 247, 0.09);
  --fr-line-strong: rgba(247, 242, 247, 0.15);
  --fr-amethyst: #9b59b6;
  --fr-rose: #e0bfb8;
  --fr-blue: #6c98ee;
  --fr-light-blue: #a0bef5;
  --fr-gold: #d9c08c;
  --fr-pink: #ff69b4;
  --fr-green: #4be36e;
  --fr-teal: #91afb3;
  --fr-navy: #1b365d;
  --fr-card-radius: 24px;
  --fr-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fr-page-max: 1220px;
  --fr-gutter: clamp(1rem, 2.4vw, 1.6rem);
  --safe-top: env(safe-area-inset-top, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background: var(--fr-bg-deep);
}

body,
body[data-theme="light"] {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--fr-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(132deg, rgba(155, 89, 182, 0.11) 0%, rgba(155, 89, 182, 0.045) 22%, rgba(155, 89, 182, 0.012) 42%, rgba(155, 89, 182, 0) 58%),
    linear-gradient(180deg, var(--fr-bg) 0%, var(--fr-bg-deep) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 79px,
    rgba(255, 255, 255, 0.012) 80px
  );
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100%, calc(var(--fr-page-max) + (var(--fr-gutter) * 2)));
  margin: 0 auto;
  padding: calc(var(--safe-top) + 0.7rem) var(--fr-gutter) 54px;
}

.masthead,
body[data-theme="light"] .masthead {
  position: sticky;
  top: var(--safe-top);
  z-index: 30;
  isolation: isolate;
  margin: 0 0 clamp(0.9rem, 1.8vw, 1.35rem);
  padding: clamp(0.45rem, 1.1vw, 0.75rem) 0 clamp(0.65rem, 1.5vw, 0.95rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.masthead::before,
body[data-theme="light"] .masthead::before {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: calc(var(--safe-top) + 8rem);
  z-index: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.94) 0%, rgba(9, 9, 11, 0.82) 68%, rgba(9, 9, 11, 0) 100%);
}

.masthead::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 1px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, transparent 0%, rgba(108, 152, 238, 0.34) 14%, var(--fr-line) 54%, transparent 100%);
}

.masthead-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 68px;
  gap: clamp(0.8rem, 2vw, 1.5rem);
}

.otw-home {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  gap: 9px;
  color: var(--fr-soft);
  text-decoration: none;
  transition: color 180ms ease;
}

.otw-home:hover,
.otw-home:focus-visible {
  color: var(--fr-ink);
}

.otw-home img {
  width: clamp(12rem, 19vw, 17rem);
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.otw-home span {
  display: none;
}

.frgmnts-brand {
  display: grid;
  width: 88px;
  height: 62px;
  place-items: center;
  justify-self: center;
  text-decoration: none;
}

.frgmnts-brand img {
  display: block;
  width: 82px;
  height: 57px;
  object-fit: contain;
  transition: filter 180ms ease, transform 240ms var(--fr-ease);
}

.frgmnts-brand:hover img,
.frgmnts-brand:focus-visible img {
  filter: drop-shadow(0 0 12px rgba(155, 89, 182, 0.28));
  transform: translateY(-1px);
}

.masthead-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
}

.masthead-app-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: filter 180ms ease, transform 220ms var(--fr-ease);
}

.masthead-app-link img {
  display: block;
  width: 120px;
  height: 40px;
}

.masthead-app-link:hover,
.masthead-app-link:focus-visible {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.refresh-feed-btn {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--fr-line);
  border-radius: 50%;
  color: var(--fr-soft);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 220ms var(--fr-ease);
}

.refresh-feed-btn:hover,
.refresh-feed-btn:focus-visible {
  border-color: rgba(108, 152, 238, 0.5);
  color: var(--fr-light-blue);
  transform: rotate(18deg);
}

.refresh-feed-btn:disabled {
  cursor: wait;
  opacity: 0.45;
}

.refresh-feed-btn svg {
  width: 16px;
  height: 16px;
}

.fragments-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
  gap: clamp(1.4rem, 3vw, 2.3rem);
}

.feed-column {
  min-width: 0;
}

.fragments-rail {
  position: sticky;
  top: calc(var(--safe-top) + 104px);
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 24px;
}

.feed {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.fragment-card {
  --signal-color: var(--fr-blue);
  position: relative;
  min-width: 0;
  scroll-margin-top: calc(var(--safe-top) + 76px);
  padding: 15px 17px 13px;
  overflow: hidden;
  border: 1px solid var(--fr-line);
  border-radius: var(--fr-card-radius);
  color: var(--fr-ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), transparent 28%),
    rgba(21, 21, 23, 0.982);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24), 0 2px 7px rgba(0, 0, 0, 0.3);
  transition: border-color 220ms ease, box-shadow 260ms var(--fr-ease), transform 260ms var(--fr-ease);
}

.fragment-card::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  content: "";
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.fragment-card:hover {
  border-color: color-mix(in srgb, var(--signal-color) 28%, var(--fr-line));
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.34);
  transform: translateY(-1px);
}

.fragment-card > * {
  position: relative;
  z-index: 1;
}

.fragment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.fragment-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.fragment-avatar,
.fragment-avatar.initials-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(247, 242, 247, 0.13);
  border-radius: 50%;
  object-fit: cover;
  background: var(--fr-paper-warm);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.fragment-avatar.initials-avatar {
  display: grid;
  place-items: center;
  color: var(--fr-light-blue);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
}

.fragment-id,
.fragment-title,
.fragment-title-top {
  min-width: 0;
}

.fragment-title-top {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fragment-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fragment-handle {
  margin-top: 3px;
  overflow: hidden;
  color: var(--fr-dim);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verified-badge {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.fragment-time {
  flex: 0 0 auto;
  padding-top: 3px;
  color: var(--fr-dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.fragment-content {
  min-width: 0;
}

.fragment-content::after {
  display: table;
  clear: both;
  content: "";
}

.fragment-body {
  max-width: 62ch;
  margin: 0;
  color: var(--fr-ink);
  font-size: 15.6px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.fragment-body a {
  padding: 0 0.08em;
  color: inherit;
  text-decoration: none;
  box-shadow: inset 0 -0.12em 0 rgba(108, 152, 238, 0.62);
  transition: box-shadow 210ms var(--fr-ease), color 160ms ease;
}

.fragment-body a:hover,
.fragment-body a:focus-visible {
  color: #09090b;
  box-shadow: inset 0 -1.34em 0 var(--fr-light-blue);
}

.fragment-media {
  float: right;
  width: 78px;
  margin: 1px 0 12px 16px;
}

.fragment-media-button {
  position: relative;
  display: block;
  width: 78px;
  height: 78px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(247, 242, 247, 0.13);
  border-radius: 50%;
  background: var(--fr-paper-warm);
  cursor: zoom-in;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.27);
  transition: border-color 180ms ease, transform 240ms var(--fr-ease);
}

.fragment-media-button:hover,
.fragment-media-button:focus-visible {
  border-color: color-mix(in srgb, var(--signal-color) 55%, white 10%);
  transform: scale(1.025);
}

.fragment-media-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fragment-media-count {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  background: rgba(3, 3, 5, 0.82);
}

.fragment-card.is-photo-only .fragment-media {
  float: none;
  width: 100%;
  margin: 0;
}

.fragment-card.is-photo-only .fragment-media-button {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
}

.fragment-link-card {
  display: grid;
  grid-template-columns: 1fr;
  width: min(100%, 520px);
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(160, 190, 245, 0.28);
  border-radius: 13px;
  color: #fff;
  text-decoration: none;
  background: var(--fr-navy);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  transition: box-shadow 240ms var(--fr-ease), transform 240ms var(--fr-ease);
}

.fragment-link-card:hover,
.fragment-link-card:focus-visible {
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.29);
  transform: translateY(-2px);
}

.fragment-link-card.is-text-only {
  min-height: 0;
}

.fragment-link-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--fr-bg-deep);
}

.fragment-link-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--fr-ease);
}

.fragment-link-card:hover .fragment-link-image img,
.fragment-link-card:focus-visible .fragment-link-image img {
  transform: scale(1.015);
}

.fragment-link-copy {
  display: flex;
  min-height: 62px;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 12px 15px 13px;
  background: var(--fr-navy);
}

.fragment-link-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fragment-link-host {
  margin-top: 5px;
  overflow: hidden;
  color: rgba(160, 190, 245, 0.82);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: lowercase;
  white-space: nowrap;
}

.fragment-foot {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--fr-line);
}

.fragment-signal {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: color-mix(in srgb, var(--signal-color) 88%, white 12%);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.signal-glyph {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 10px;
  color: var(--signal-color);
  background: color-mix(in srgb, var(--signal-color) 12%, transparent);
}

.signal-symbol {
  display: block;
  width: 13px;
  height: 13px;
}

.signal-symbol .signal-cutout {
  fill: var(--fr-paper);
}

.signal-symbol .signal-stroke {
  fill: none;
  stroke: var(--fr-paper);
  stroke-width: 1.8;
}

.signal-symbol .signal-dots {
  stroke-width: 2.8;
}

.fragment-foot-meta {
  color: var(--fr-dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fragment-card[data-signal="positivity"] { --signal-color: var(--fr-gold); }
.fragment-card[data-signal="check-in"] { --signal-color: var(--fr-blue); }
.fragment-card[data-signal="check_in"] { --signal-color: var(--fr-blue); }
.fragment-card[data-signal="regret"] { --signal-color: var(--fr-rose); }
.fragment-card[data-signal="spiritual"] { --signal-color: var(--fr-amethyst); }
.fragment-card[data-signal="residue"] { --signal-color: var(--fr-teal); }
.fragment-card[data-signal="complaint"] { --signal-color: var(--fr-pink); }
.fragment-card[data-signal="otw-bot"] { --signal-color: var(--fr-amethyst); }
.fragment-card[data-signal="otw_bot"] { --signal-color: var(--fr-amethyst); }
.fragment-card[data-signal="photo"] { --signal-color: var(--fr-light-blue); }

.feed-controls {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

.feed-controls[hidden] {
  display: none;
}

.load-more-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--fr-line-strong);
  border-radius: 8px;
  color: var(--fr-soft);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.load-more-btn:hover,
.load-more-btn:focus-visible {
  border-color: rgba(108, 152, 238, 0.5);
  color: var(--fr-ink);
  background: rgba(108, 152, 238, 0.1);
}

.feed-status {
  margin: 2px 6px 0;
  color: var(--fr-dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.empty-card,
.feed-loading {
  display: grid;
  min-height: 230px;
  padding: 32px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--fr-line);
  border-radius: var(--fr-card-radius);
  text-align: center;
  background: rgba(21, 21, 23, 0.92);
}

.empty-title {
  margin: 0;
  font-size: 17px;
}

.empty-copy {
  max-width: 34ch;
  margin: 8px 0 0;
  color: var(--fr-soft);
  font-size: 14px;
  line-height: 1.55;
}

.feed-loading {
  grid-template-columns: auto auto;
  min-height: 160px;
  gap: 10px;
  color: var(--fr-dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.feed-loading-signal {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fr-amethyst);
  box-shadow: 0 0 0 0 rgba(155, 89, 182, 0.4);
  animation: signal-pulse 1.7s ease-out infinite;
}

@keyframes signal-pulse {
  0% { box-shadow: 0 0 0 0 rgba(155, 89, 182, 0.42); }
  75%, 100% { box-shadow: 0 0 0 9px rgba(155, 89, 182, 0); }
}

.rail-app {
  padding: 22px;
  border: 1px solid var(--fr-line);
  border-radius: var(--fr-card-radius);
  background:
    linear-gradient(145deg, rgba(155, 89, 182, 0.11), transparent 42%),
    rgba(21, 21, 23, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.23);
}

.rail-app-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.rail-app-icon {
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid var(--fr-line-strong);
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.27);
}

.rail-kicker {
  margin: 0;
  color: var(--fr-amethyst);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rail-app h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1.2;
}

.rail-app > p {
  margin: 7px 0 0;
  color: var(--fr-soft);
  font-size: 14px;
  line-height: 1.5;
}

.rail-app-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  padding: 0 14px;
  border: 1px solid rgba(155, 89, 182, 0.44);
  border-radius: 8px;
  color: var(--fr-ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
  background: rgba(155, 89, 182, 0.1);
  transition: background 180ms ease, border-color 180ms ease, transform 220ms var(--fr-ease);
}

.rail-app-link:hover,
.rail-app-link:focus-visible {
  border-color: rgba(155, 89, 182, 0.72);
  background: rgba(155, 89, 182, 0.18);
  transform: translateX(2px);
}

.rail-app-link svg {
  width: 15px;
  height: 15px;
}

.rail-otw {
  border-top: 1px solid var(--fr-line-strong);
}

.rail-otw .rail-kicker {
  padding: 17px 2px 12px;
  color: var(--fr-light-blue);
}

.rail-otw > a {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 26px 14px 2px;
  border-top: 1px solid var(--fr-line);
  text-decoration: none;
}

.rail-otw > a::after {
  position: absolute;
  top: 50%;
  right: 4px;
  color: var(--fr-dim);
  font-size: 16px;
  content: "\2192";
  transform: translateY(-50%);
  transition: color 180ms ease, transform 220ms var(--fr-ease);
}

.rail-otw > a:hover::after,
.rail-otw > a:focus-visible::after {
  color: var(--fr-green);
  transform: translate(3px, -50%);
}

.rail-otw span {
  width: fit-content;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  box-shadow: inset 0 -1px 0 transparent;
  transition: box-shadow 180ms ease;
}

.rail-otw > a:hover span,
.rail-otw > a:focus-visible span {
  box-shadow: inset 0 -0.2em 0 rgba(75, 227, 110, 0.2), inset 0 -1px 0 var(--fr-green);
}

.rail-otw small {
  color: var(--fr-dim);
  font-size: 11.5px;
  line-height: 1.35;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(var(--fr-page-max), calc(100% - (var(--fr-gutter) * 2)));
  margin: 0 auto;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 28px);
  color: var(--fr-dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 8.5px;
  line-height: 1.55;
  text-align: center;
  text-transform: uppercase;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.site-footer a {
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--fr-light-blue);
}

.site-footer p {
  margin: 10px 0 0;
}

.media-viewer {
  width: min(1100px, calc(100vw - 28px));
  max-width: none;
  height: min(820px, calc(100dvh - 28px));
  max-height: none;
  padding: 46px 18px 18px;
  overflow: hidden;
  border: 1px solid var(--fr-line-strong);
  border-radius: 20px;
  color: var(--fr-ink);
  background: rgba(3, 3, 5, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.68);
}

.media-viewer::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.media-viewer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--fr-line-strong);
  border-radius: 50%;
  color: var(--fr-soft);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.media-viewer-close:hover,
.media-viewer-close:focus-visible {
  color: var(--fr-ink);
  border-color: rgba(160, 190, 245, 0.48);
}

.media-viewer-close svg {
  width: 17px;
  height: 17px;
}

.media-viewer figure {
  display: grid;
  width: 100%;
  height: 100%;
  margin: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.media-viewer img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.media-viewer figcaption {
  min-height: 12px;
  color: var(--fr-dim);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.menu-toggle,
.theme-toggle,
.type-line,
.signals-rail,
.fragment-tag,
.fragment-reactions,
.fragment-media-panel,
.fragment-media-caption,
.fragment-media-collapse {
  display: none !important;
}

@media (max-width: 900px) {
  .masthead-inner {
    min-height: 56px;
  }

  .otw-home img {
    width: clamp(9.5rem, 34vw, 12rem);
  }

  .frgmnts-brand {
    width: 72px;
    height: 52px;
  }

  .frgmnts-brand img {
    width: 68px;
    height: 48px;
  }

  .fragments-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .feed-column,
  .fragments-rail {
    width: min(100%, 760px);
    margin-inline: auto;
  }

  .fragments-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: 100%;
    padding: var(--safe-top) 8px 46px;
  }

  .site-footer {
    width: calc(100% - 16px);
  }

  .masthead,
  body[data-theme="light"] .masthead {
    margin: 0 0 15px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .masthead-inner {
    grid-template-columns: minmax(36px, 1fr) auto minmax(90px, 1fr);
    gap: 6px;
  }

  .masthead-actions,
  body[data-theme="light"] .masthead-actions {
    position: static;
    width: auto;
    padding: 0;
    align-items: center;
    flex-direction: row;
    gap: 4px;
    border: 0;
    border-radius: 0;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }

  .otw-home img {
    width: clamp(7.4rem, 32vw, 9rem);
    height: auto;
  }

  .frgmnts-brand {
    width: 58px;
    height: 42px;
  }

  .frgmnts-brand img {
    width: 56px;
    height: 39px;
  }

  .masthead-app-link img {
    width: 90px;
    height: 30px;
  }

  .refresh-feed-btn {
    width: 34px;
    height: 34px;
  }

  .fragment-card {
    padding: 15px 15px 12px;
    border-radius: 22px;
  }

  .fragment-head {
    gap: 8px;
  }

  .fragment-identity {
    gap: 10px;
  }

  .fragment-time {
    max-width: 104px;
    font-size: 8px;
    white-space: normal;
  }

  .fragment-body {
    max-width: none;
    font-size: 15.5px;
    line-height: 1.56;
  }

  .fragments-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .rail-app {
    padding: 20px;
  }

  .rail-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .rail-app-link {
    display: flex;
  }

  .media-viewer {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    padding: 48px 8px 12px;
    border-radius: 16px;
  }
}

@media (max-width: 390px) {
  .fragment-media {
    width: 72px;
    margin-left: 13px;
  }

  .fragment-media-button {
    width: 72px;
    height: 72px;
  }

  .fragment-link-copy {
    min-height: 60px;
  }
}

@media (hover: none) {
  .fragment-card:hover,
  .fragment-link-card:hover,
  .fragment-media-button:hover,
  .rail-app-link:hover {
    transform: none;
  }

  .fragment-link-card:hover .fragment-link-image img {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
