.fa { margin-top: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); overflow: hidden; container: fa / inline-size; }
.fa-head { display: flex; align-items: baseline; gap: 6px; padding: 12px 16px 0; font: 600 var(--t-footnote)/1.45 var(--font); letter-spacing: -0.005em; color: var(--ink-3); }
.fa-count { font-weight: 500; }
.fa-list { list-style: none; margin: 0; padding: 0; }
.fa-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: var(--row-2); padding: 10px 12px 10px 16px; transition: background-color var(--dur-1) var(--ease-out); }
.fa-row + .fa-row { border-top: 1px solid var(--line); }

.fa-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--wash-2); color: var(--ink-2); }
.fa-tile svg { width: var(--ic-lg); height: var(--ic-lg); }

.fa-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
a.fa-main::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
a.fa-main:focus-visible { outline: none; }
a.fa-main:focus-visible::after { outline: var(--focus); outline-offset: -2px; }

.fa > .fa-list:first-child > .fa-row:first-child > a.fa-main::after { border-top-left-radius: calc(var(--r-lg) - 1px); border-top-right-radius: calc(var(--r-lg) - 1px); }
.fa .fa-list > .fa-row:last-child > a.fa-main::after { border-bottom-left-radius: calc(var(--r-lg) - 1px); border-bottom-right-radius: calc(var(--r-lg) - 1px); }
.fa-name { display: flex; min-width: 0; font: 500 var(--t-body)/1.45 var(--font); letter-spacing: -0.01em; }
.fa-base { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-ext { flex: none; white-space: nowrap; }

.fa-meta { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 400 var(--t-footnote)/1.45 var(--font); letter-spacing: -0.005em; color: var(--ink-3); }
.fa-dot { padding: 0 6px; color: var(--ink-4); }

.fa-view { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; height: var(--h-sm); padding: 0 14px; border-radius: var(--r-pill); background: var(--wash-2); color: var(--ink); font: 500 var(--t-footnote)/1 var(--font); letter-spacing: -0.005em; white-space: nowrap; text-decoration: none; transition: background-color var(--dur-1) var(--ease-out), scale var(--dur-3) var(--spring); }
.fa-view::after { content: ''; position: absolute; inset: -6px -4px; }
.fa-view svg { display: none; flex: none; width: var(--ic-sm); height: var(--ic-sm); }
.fa-view:active { scale: var(--m-press-chip); transition-duration: var(--dur-1); }

.fa-dl { flex: none; display: grid; place-items: center; width: var(--h-sm); height: var(--h-sm); color: var(--ink-3); pointer-events: none; transition: color var(--dur-1) var(--ease-out); }
.fa-dl svg { width: var(--ic-md); height: var(--ic-md); }
.fa-row:has(a.fa-main):active { background: var(--wash-2); }
@media (hover: hover) and (pointer: fine) {
  .fa-row:has(a.fa-main):hover { background: var(--wash-1); }
  .fa-row:hover .fa-dl { color: var(--ink); }
  .fa-view:hover { background: var(--wash-3); }
}

@container fa (max-width: 440px) {
  .fa-view { width: var(--h-sm); padding: 0; justify-content: center; border-radius: 50%; }
  .fa-view svg { display: block; }
  .fa-view span { display: none; }
  .fa-view::after { inset: -6px; }
  .fa-row:has(.fa-view) .fa-dl { display: none; }
}

.fa-more-row { min-height: var(--h-lg); padding: 0; }
.fa-more { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: var(--h-lg); padding: 0 20px 0 16px; color: var(--ink-2); font: 500 var(--t-ui)/1.45 var(--font); letter-spacing: -0.01em; text-decoration: none; }
.fa-more svg { flex: none; width: var(--ic-sm); height: var(--ic-sm); color: var(--ink-4); }
@media (hover: hover) and (pointer: fine) { .fa-more:hover { color: var(--ink); background: var(--wash-1); } }
.fa-more:focus-visible { outline: var(--focus); outline-offset: -2px; border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px); }

.fa-edits { display: grid; gap: var(--s-2); }
.fa-edits:empty { display: none; }
.fa-edit { min-height: var(--row); padding: 8px 6px 8px 10px; gap: 10px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--paper); overflow: hidden; transition: border-color var(--dur-1) var(--ease-out); }
.fa-edits .fa-edit + .fa-edit { border-top: 1px solid var(--line-2); }
.fa-edit .fa-tile { width: var(--h-sm); height: var(--h-sm); border-radius: var(--r-sm); }
.fa-edit .fa-tile svg { width: var(--ic-sm); height: var(--ic-sm); }
.fa-edit .fa-name { font-size: var(--t-ui); }
.fa-edit .fa-meta { font-size: var(--t-caption); }
.fa-edit .fa-view { height: 28px; padding: 0 12px; font-size: var(--t-caption); }
.fa-edit .fa-view::after { inset: -8px -4px; }
.fa-x { position: relative; flex: none; display: grid; place-items: center; width: var(--h-sm); height: var(--h-sm); border-radius: 50%; color: var(--ink-3); transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), scale var(--dur-3) var(--spring); }
.fa-x::after { content: ''; position: absolute; inset: -6px; }
.fa-x svg { width: var(--ic-sm); height: var(--ic-sm); }
.fa-x:active { scale: var(--m-press-icon); transition-duration: var(--dur-1); }
@media (hover: hover) and (pointer: fine) { .fa-x:hover { background: var(--wash-2); color: var(--ink); } }

.fa-prog { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 1%); background: var(--ink); opacity: 0; transition: width var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out); }
.fa-edit[data-state="uploading"] .fa-prog { opacity: 1; }
.fa-edit:is([data-state="uploading"], [data-state="queued"]) .fa-tile { color: var(--ink-4); }
.fa-up { color: var(--ink-3); }

.fa-edit[data-state="queued"] .fa-name { color: var(--ink-3); }

.fa-edit[data-state="error"] { border-color: var(--danger-line); }
.fa-edit[data-state="error"] .fa-tile { background: var(--danger-wash); color: var(--danger); }
.fa-err { color: var(--danger); font-weight: 500; word-break: keep-all; overflow-wrap: anywhere; }

.fa-edit[data-state="error"] .fa-meta { white-space: normal; overflow: visible; }

.fa-del { position: relative; z-index: 1; flex: none; display: flex; }
.fa-del .fa-x svg { width: var(--ic-sm); height: var(--ic-sm); }
@media (hover: hover) and (pointer: fine) {
  .fa-del { opacity: 0; transition: opacity var(--dur-1) var(--ease-out); }
  .fa-row:is(:hover, :focus-within) .fa-del { opacity: 1; }
  .fa-del .fa-x:hover { color: var(--danger); background: var(--danger-wash); }
}

.fcard .fa-feed { margin-top: var(--s-3); }
.fa-feed .fa-row:not(.fa-more-row) { min-height: 52px; padding: 8px 12px; gap: 10px; }
.fa-feed .fa-main { gap: 0; }
.fa-feed .fa-tile { width: var(--h-sm); height: var(--h-sm); border-radius: var(--r-sm); }
.fa-feed .fa-tile svg { width: var(--ic-sm); height: var(--ic-sm); }
.fa-feed .fa-name { font-size: var(--t-ui); line-height: 1.4; }
.fa-feed .fa-meta { font-size: var(--t-caption); line-height: 1.4; }
.fa-feed .fa-more-row, .fa-feed .fa-more { min-height: var(--hit); }
.fa-feed .fa-more { padding: 0 16px 0 12px; font-size: var(--t-footnote); }

@media (max-width: 699px) { .fcard .fa-feed { margin-left: calc(-1 * (var(--av-md) + var(--s-3))); } }

.tweet-body > .fa { margin-top: var(--s-4); }

.art-x > .art-files { margin-top: var(--s-7); }

.composer-post-main > .fa-edits:not(:empty) { margin-top: var(--s-3); }
.has-docs .drop-hint { display: none; }

.compose-modal .composer-post-main > .fa-edits { max-height: min(292px, 36svh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-block: 1px; }

.fa-edits[data-fade="bottom"] { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent); }
.fa-edits[data-fade="top"] { -webkit-mask-image: linear-gradient(to top, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to top, #000 calc(100% - 16px), transparent); }
.fa-edits[data-fade="both"] { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
@media (min-width: 700px) { .compose-modal:has(> form.has-docs) { max-height: calc(100svh - 12vh - 16px); overflow-y: auto; } }

@media (max-width: 699px) { .compose-modal .composer-post-main > .fa-edits { margin-left: calc(-40px - var(--s-3)); } }

.fa-box .fa-edits:not(:empty) { margin-bottom: var(--s-3); }
.fa-add {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: var(--h-md);
  border: 0; border-radius: var(--r-pill); background: var(--wash-2); color: var(--ink);
  font: 500 var(--t-ui)/1 var(--font); letter-spacing: -0.01em; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), scale var(--dur-3) var(--spring);
}
.fa-add svg { width: var(--ic-sm); height: var(--ic-sm); }
.fa-add:active { scale: var(--m-press); transition-duration: var(--dur-1); }
.fa-add:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) { .fa-add:hover { background: var(--wash-3); } }

@media (hover: none) { .fa-hint-drag { display: none; } }

.wr-files-line { margin-top: var(--s-7); }
.wr-canvas:has(.wr-body.is-blank) .wr-files-line:not(.has-files) { display: none; }
.wr-files-line .wr-facts-add .num { font-weight: 600; }

.ar-files { margin-top: var(--s-7); scroll-margin-top: 72px; }
.ar-files > .ar-sub[hidden] { display: none; }
.ar-files > .fa { margin-top: 0; }
.ar-files > .fa-edits:not(:empty) { margin-top: var(--s-3); }
.ar-files .ar-drop p strong { margin-right: 6px; }

.fpv {
  position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s-6);
  background: var(--scrim); backdrop-filter: var(--scrim-blur); -webkit-backdrop-filter: var(--scrim-blur);
  animation: m-fade var(--dur-3) var(--ease-out);
}
.fpv.is-closing { animation: m-fade-out var(--dur-2) var(--ease-in) both; }
.fpv-card {
  display: flex; flex-direction: column; width: min(1040px, 100%); height: min(100%, 1200px); overflow: hidden;
  border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--e-3);
  animation: m-pop var(--dur-3) var(--spring);
}
.fpv.is-img .fpv-card { width: auto; max-width: min(1040px, 100%); height: auto; max-height: 100%; }
.fpv.is-closing .fpv-card { animation: m-fade-out var(--dur-2) var(--ease-in) both; }
.fpv-grip { display: none; }
.fpv-head { flex: none; display: flex; align-items: center; gap: var(--s-3); min-height: var(--bar-h); padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.fpv-head .fa-tile { width: var(--h-sm); height: var(--h-sm); border-radius: var(--r-sm); }
.fpv-head .fa-tile svg { width: var(--ic-sm); height: var(--ic-sm); }
.fpv-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fpv-name { display: block; min-width: 0; font: 600 var(--t-ui)/1.45 var(--font); letter-spacing: -0.01em; color: var(--ink); }
.fpv-name .fa-name { font: inherit; }
.fpv-meta { font: 400 var(--t-caption)/1.45 var(--font); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpv-btn {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: var(--h-sm); padding: 0 14px 0 10px;
  border-radius: var(--r-pill); background: var(--ink); color: #fff; font: 500 var(--t-footnote)/1 var(--font); text-decoration: none;
  transition: background-color var(--dur-1) var(--ease-out), scale var(--dur-3) var(--spring);
}
.fpv-btn svg { width: var(--ic-sm); height: var(--ic-sm); }
.fpv-btn::after { content: ''; position: absolute; inset: -6px -2px; }
.fpv-ib {
  position: relative; flex: none; display: grid; place-items: center; width: var(--h-sm); height: var(--h-sm); border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), scale var(--dur-3) var(--spring);
}
.fpv-ib svg { width: var(--ic-md); height: var(--ic-md); }
.fpv-ib::after { content: ''; position: absolute; inset: -6px; }
.fpv-ib[data-fpv-close] { background: var(--wash-2); color: var(--ink); }
.fpv-btn:active, .fpv-ib:active { scale: var(--m-press-icon); transition-duration: var(--dur-1); }
.fpv-btn:focus-visible, .fpv-ib:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) {
  .fpv-btn:hover { background: var(--ink-hover); }
  .fpv-ib:hover { background: var(--wash-2); color: var(--ink); }
  .fpv-ib[data-fpv-close]:hover { background: var(--wash-3); }
}
.fpv-body { flex: 1; min-height: 0; display: grid; place-items: center; background: var(--canvas-2); }
.fpv-body iframe { width: 100%; height: 100%; border: 0; background: var(--canvas-2); }
.fpv-body img { display: block; max-width: 100%; max-height: calc(100svh - var(--s-6) * 2 - var(--bar-h)); object-fit: contain; }

@media (max-width: 699px) {
  .fa-row { padding: 10px 8px 10px 14px; gap: 10px; }
  .fa-more-row { padding: 0; }
  .fa-feed .fa-row:not(.fa-more-row) { padding: 8px 8px 8px 12px; }
  .fa-head { padding: 12px 14px 0; }
  .fa-more { padding: 0 16px 0 14px; }
  .fa-edit { padding: 8px 4px 8px 10px; }
}

@media (max-width: 699px) {
  .fpv { place-items: end stretch; padding: 0; }
  .fpv-card, .fpv.is-img .fpv-card { width: 100%; max-width: none; height: auto; max-height: 92svh; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: env(safe-area-inset-bottom); animation: m-sheet-in var(--dur-3) var(--ease-out); }
  .fpv.is-closing .fpv-card { animation: m-sheet-out var(--dur-2) var(--ease-in) both; }
  .fpv-grip { display: block; flex: none; width: 36px; height: 5px; margin: 8px auto 0; border-radius: var(--r-pill); background: var(--line-3); }
  .fpv-head { min-height: var(--row); padding: 6px 10px 10px 14px; gap: 10px; }
  .fpv-tab { display: none; }
  .fpv-body img { max-height: calc(92svh - 88px); }
}

.lib-bar { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.lib-find { position: relative; flex: 1 1 auto; min-width: 0; max-width: 480px; margin: 0; }
.lib-find > svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: var(--ic-md); height: var(--ic-md); color: var(--ink-3); pointer-events: none; }
.lib-find .lib-q {
  display: block; width: 100%; height: var(--h-md); margin: 0; padding: 0 16px 0 44px; border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--paper); box-shadow: none; color: var(--ink); font: 400 var(--t-body)/1.2 var(--font); letter-spacing: -0.01em;
  -webkit-appearance: none; appearance: none; transition: border-color var(--dur-1) var(--ease-out);
}
.lib-find .lib-q::placeholder { color: var(--ink-3); opacity: 1; }
.lib-find .lib-q:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring-input); }
@media (hover: hover) and (pointer: fine) { .lib-find .lib-q:hover:not(:focus) { border-color: var(--line-3); } }
.lib-sort { flex: none; margin-left: auto; }
.lib-kinds { margin-bottom: var(--s-5); }
.lib-kinds:empty { display: none; }

.lib-results > .lib-list { margin-top: 0; container-type: inline-size; }
.lib-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "tile name acts" "tile src src";
  column-gap: 12px; row-gap: 2px; align-items: center;
}
.lib-row > .fa-tile { grid-area: tile; }
.lib-row > .fa-main { grid-area: name; }
.lib-row > .lib-src { grid-area: src; }
.lib-row > .lib-acts { grid-area: acts; }
.lib-acts { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.lib-src { display: flex; align-items: center; min-width: 0; margin: 0; white-space: nowrap; font: 400 var(--t-footnote)/1.45 var(--font); letter-spacing: -0.005em; color: var(--ink-3); }
.lib-post {
  position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; max-width: 100%;
  color: var(--ink-2); text-decoration: none; border-radius: var(--r-xs);
}
.lib-post::after { content: ''; position: absolute; inset: -4px -2px; }
.lib-post:focus-visible { outline: var(--focus); outline-offset: 2px; }
.lib-type { flex: none; color: var(--ink-3); }
.lib-ttl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lib-by { flex: none; display: inline-flex; align-items: center; }
.lib-post + .lib-by::before { content: '·'; padding: 0 6px; color: var(--ink-4); }
@media (hover: hover) and (pointer: fine) { .lib-post:hover .lib-ttl { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; } }

.lib-view svg { display: none; }
@container (max-width: 559px) {
  .lib-view { width: var(--h-sm); padding: 0; justify-content: center; border-radius: 50%; }
  .lib-view svg { display: block; width: var(--ic-sm); height: var(--ic-sm); }
  .lib-view span { display: none; }
  .lib-row .fa-dl { display: none; }
}
@container (min-width: 720px) {
  .lib-row { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 17rem) 9.5rem; grid-template-areas: "tile name src acts"; column-gap: var(--s-4); }
  .lib-src { flex-direction: column; align-items: flex-start; gap: 2px; }
  .lib-post + .lib-by::before { content: none; }
}

.lib-row:has(.lib-del) { padding-right: 12px; }

@container (max-width: 719px) {
  .lib-row { padding-bottom: 13px; }
  .lib-post::after { inset: -12.5px -8px; }
}

.lib .lib-results, .lib .lib-kinds { transition: opacity var(--dur-2) var(--ease-out); }
.lib[aria-busy="true"] :is(.lib-results, .lib-kinds) { opacity: .55; transition-delay: 160ms; }

.lib-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-6); margin-top: var(--s-4); padding: 0 var(--s-1); }
.lib-note { margin: 0; font: 400 var(--t-footnote)/1.5 var(--font); letter-spacing: -0.005em; color: var(--ink-3); word-break: keep-all; }
.lib-use { display: flex; align-items: center; gap: var(--s-3); font: 400 var(--t-footnote)/1.45 var(--font); color: var(--ink-3); white-space: nowrap; }
.lib-use.is-full .lib-use-t { color: var(--ink); font-weight: 500; }
.lib-meter { position: relative; flex: none; width: 96px; height: 4px; border-radius: var(--r-pill); background: var(--wash-3); overflow: hidden; }
.lib-meter > i { position: absolute; left: 0; top: 0; bottom: 0; width: max(2px, calc(var(--u, 0) * 1%)); border-radius: inherit; background: var(--ink); }
.page-actions .btn svg { width: var(--ic-sm); height: var(--ic-sm); }

@media (max-width: 699px) {
  .lib-bar { gap: var(--s-2); margin-bottom: var(--s-3); }
  .lib-find { max-width: none; }
  .lib-find .lib-q { font-size: 16px; padding-right: 12px; }
  .lib-kinds { margin-bottom: var(--s-4); }
  .lib-row, .lib-row:has(.lib-del) { padding-right: 8px; column-gap: 10px; }
  .lib-foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .fa-prog { transition: none; }
  .fpv, .fpv-card, .fpv.is-closing, .fpv.is-closing .fpv-card { animation: none; }
  .lib .lib-results, .lib .lib-kinds { transition: none; }
}

.wr-files-line .wr-facts-add { display: inline-flex; align-items: center; gap: 6px; height: calc(var(--h-xs) + var(--s-1)); padding: 0 var(--s-3) 0 10px; border: 0; border-radius: var(--r-pill); background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); font: 500 var(--t-footnote)/1 var(--font); cursor: pointer; transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.wr-files-line .wr-facts-add > svg { flex: none; width: 14px; height: 14px; }
.wr-files-line.has-files .wr-facts-add { color: var(--ink); }
@media (hover: hover) { .wr-files-line .wr-facts-add:hover { background: var(--wash-1); color: var(--ink); } }
.wr-files-line .wr-facts-add:active { scale: var(--m-press-chip); }
