.files-main .page-heading { margin-bottom: 20px; }
.files-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.files-intro p { margin: 0; color: #b1b1b1; font-size: 13px; line-height: 1.7; }
.files-intro > span { flex: 0 0 auto; padding: 5px 9px; color: #a7c8ee; border: 1px solid #33465c; border-radius: 3px; font-size: 10px; }
.files-tools { margin: 24px 0 22px; }
.files-search-label { display: block; margin-bottom: 9px; color: #a7b4c2; font-size: 10px; }
.files-search { display: block; width: min(100%, 430px); min-height: 44px; padding: 12px 15px; border: 1px solid #3b4652; border-radius: 4px; background: #1b2026; color: #edf3fa; font: 400 13px Inter, "Segoe UI", sans-serif; }
.files-search::placeholder { color: #8897a7; }
.files-search:focus-visible { outline: 2px solid var(--launcher-accent); outline-offset: 2px; }
.files-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.files-categories button { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 10px 13px; border: 1px solid #343c46; border-radius: 4px; background: #1b1f24; color: #a8b3be; font: 500 11px Inter, "Segoe UI", sans-serif; cursor: pointer; }
.files-categories button > span { color: #8190a0; font-size: 10px; }
.files-categories button:hover { background: #242e39; color: #fff; }
.files-categories button[aria-pressed="true"] { background: #20364e; border-color: #5484b8; color: #d3e8ff; }
.files-categories button[aria-pressed="true"] > span { color: #97c9ff; }
.files-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.files-results-heading p { margin: 0; color: #94a1af; font-size: 10px; line-height: 1.6; }
.files-results-heading #files-result-status { color: #d6dee7; font-size: 12px; }
.files-empty, .files-error { padding: 50px 24px; border: 1px solid #303b48; border-radius: 4px; text-align: center; background: #1b2026; }
.files-empty h2 { margin: 0 0 10px; font-size: 21px; font-weight: 500; }
.files-empty p, .files-error p { color: #a2b0bf; font-size: 13px; }
.files-error button { cursor: pointer; font-family: inherit; }
.files-help { display: flex; align-items: baseline; gap: 8px; margin: 0 0 26px; color: #8d99a6; font-size: 11px; line-height: 1.7; }
.files-help > span { color: var(--launcher-accent); }
.files-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 24px; }
.file-card { min-width: 0; display: flex; flex-direction: column; background: #1c1c1c; border: 1px solid #303030; border-radius: 5px; overflow: hidden; }
.file-card[hidden], .files-empty[hidden], .files-error[hidden] { display: none; }
.file-preview { position: relative; isolation: isolate; height: 300px; background: radial-gradient(ellipse at 50% 45%, #263443, #151b23 75%); }
.file-cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.file-cover[hidden] { display: none; }
.preview-host { position: absolute; inset: 0; z-index: 1; }
.preview-launch { position: absolute; z-index: 3; bottom: 18px; left: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transform: translateX(-50%); min-height: 42px; padding: 11px 16px; color: #e3f0ff; background: #18314be8; border: 1px solid #5c8ab7; border-radius: 4px; font: 550 11px Inter, "Segoe UI", sans-serif; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 20px #0005; }
.preview-launch svg { width: 19px; height: 19px; }
.preview-launch:hover { background: #295781; border-color: #a0cfff; }
.preview-launch:disabled { cursor: wait; opacity: .8; }
.preview-launch[hidden] { display: none; }
.file-preview model-viewer { display: block; width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: #5aa7ff; --progress-bar-height: 2px; }
.file-preview model-viewer[hidden] { display: none; }
.file-preview model-viewer:focus-visible { outline: 2px solid var(--launcher-accent); outline-offset: -3px; }
.preview-type { position: absolute; top: 15px; left: 15px; z-index: 2; pointer-events: none; padding: 5px 8px; border: 1px solid #47596a; border-radius: 3px; color: #c6d7e9; background: #18212bd9; font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }
.preview-loading { position: absolute; inset: auto 15px 15px; display: flex; align-items: center; gap: 7px; color: #d0dbe6; font-size: 10px; pointer-events: none; text-shadow: 0 1px 4px #000; }
.preview-loading span { width: 6px; height: 6px; background: var(--launcher-accent); border-radius: 50%; }
.preview-loading[hidden] { display: none; }
.file-preview.is-ready .preview-loading, .file-preview.has-error .preview-loading { display: none; }
.preview-fallback { width: 100%; height: 100%; }
.preview-fallback[hidden] { display: none; }
.preview-fallback img { width: 100%; height: 100%; object-fit: contain; }
.preview-controls { display: flex; align-items: center; gap: 6px; padding: 8px 12px; min-height: 50px; background: #181c21; border-block: 1px solid #30363d; }
.preview-controls[hidden] { display: none; }
.preview-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-height: 34px; padding: 8px; color: #c7d5e4; background: transparent; border: 1px solid transparent; border-radius: 3px; font: 500 10px Inter, "Segoe UI", sans-serif; cursor: pointer; }
.preview-controls button svg { width: 15px; height: 15px; }
.preview-controls button:hover:not(:disabled) { background: #263442; color: #fff; }
.preview-controls button[aria-pressed="true"] { color: #aed2ff; background: #263b52; border-color: #3a5e84; }
.preview-controls button:disabled { opacity: .45; cursor: default; }
.preview-status { margin-left: auto; color: #8c9ba9; font-size: 9px; line-height: 1.5; text-align: right; }
.file-card-copy { display: flex; flex: 1; align-items: flex-start; flex-direction: column; padding: 24px; }
.file-kind { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; color: #92a1b0; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.file-kind > span { padding: 3px 5px; color: #b9c9d9; border: 1px solid #3a4652; border-radius: 2px; letter-spacing: 0; }
.file-card h2 { margin: 0 0 12px; font-size: clamp(18px, 1.7vw, 23px); line-height: 1.3; font-weight: 600; letter-spacing: -.5px; overflow-wrap: anywhere; }
.file-description { margin: 0 0 8px; color: #b8b8b8; font-size: 12px; line-height: 1.75; }
.file-preview-note { margin: 0 0 26px; color: #8e9aa7; font-size: 10px; line-height: 1.75; }
.file-download { margin-top: auto; justify-content: center; gap: 9px; cursor: pointer; font-family: inherit; }
.file-download:disabled { cursor: wait; opacity: .65; }
.file-download svg { width: 16px; height: 16px; }
.file-download > span { font-size: 11px; line-height: 1.4; }
.file-source-download { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 36px; margin-top: 10px; color: #9abfe6; font-size: 10px; line-height: 1.5; text-underline-offset: 4px; }
.file-source-download > span { color: #8c9fb2; }
.file-source-download:hover { color: #d2e8ff; }
.file-download-area { width: 100%; margin-top: auto; }
.download-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.download-actions .file-download { margin-top: 0; }
.download-cancel { min-height: 42px; padding: 10px 12px; border: 1px solid #555; border-radius: 3px; background: transparent; color: #ddd; font: 500 11px Inter, "Segoe UI", sans-serif; cursor: pointer; }
.download-cancel:hover { background: #303030; }
.download-progress { display: block; width: 100%; height: 5px; margin-top: 16px; border: 0; border-radius: 3px; background: #303b48; accent-color: var(--launcher-accent); }
.download-progress::-webkit-progress-bar { background: #303b48; border-radius: 3px; }
.download-progress::-webkit-progress-value { background: var(--launcher-accent); border-radius: 3px; }
.download-progress::-moz-progress-bar { background: var(--launcher-accent); border-radius: 3px; }
.download-cancel[hidden], .download-progress[hidden] { display: none; }
.download-status { margin: 10px 0 0; color: #a2b6cb; font-size: 10px; line-height: 1.6; }
.download-status:empty { display: none; }
.files-noscript { color: #b8b8b8; font-size: 13px; line-height: 1.7; }
@media (min-width: 1500px) {
  .file-preview { height: 360px; }
}
@media (max-width: 1050px) {
  .files-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .file-preview { height: 340px; }
  .file-card h2 { font-size: 23px; }
}
@media (max-width: 600px) {
  .files-search { width: 100%; font-size: 16px; }
  .files-categories { gap: 7px; }
  .files-categories button { padding: 10px; font-size: 10px; gap: 7px; }
  .files-results-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .files-intro { align-items: flex-start; gap: 12px; }
  .files-intro p { font-size: 12px; }
  .files-intro > span { font-size: 9px; }
  .files-help { font-size: 10px; margin-bottom: 22px; }
  .file-preview { height: 270px; }
  .file-card-copy { padding: 22px; }
  .file-card h2 { font-size: 21px; }
  .preview-controls { flex-wrap: wrap; }
  .preview-controls button { min-height: 36px; }
  .preview-status { max-width: 120px; font-size: 9px; }
  .file-download { width: 100%; }
}
