:root {
  color-scheme: light;
  --background: #f6f8fb;
  --surface: #ffffff;
  --surface-hover: #f4f7fb;
  --border: #dfe4ea;
  --text: #1f2328;
  --muted: #66707c;
  --blue: #1a73e8;
  --blue-soft: #e9f2ff;
  --folder: #5f7288;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--background);
}

button,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(260px, 720px) 1fr;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(192px, 100%);
  height: auto;
}

.search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #edf2f8;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.search:focus-within {
  border-color: #b6cdf0;
  background: #fff;
  box-shadow: 0 4px 18px rgba(43, 60, 82, 0.1);
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid #52606f;
  border-radius: 50%;
}

.search-icon::after {
  display: block;
  width: 7px;
  height: 2px;
  margin: 11px 0 0 11px;
  content: "";
  transform: rotate(45deg);
  border-radius: 4px;
  background: #52606f;
}

.search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.search input::placeholder {
  color: #667584;
}

.search kbd {
  padding: 2px 7px;
  border: 1px solid #cbd4df;
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #657282;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 72px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin: 0 4px 18px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.breadcrumbs button {
  padding: 3px 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
}

.breadcrumb-separator {
  color: #9aa3ad;
  font-size: 20px;
}

.content {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(31, 42, 55, 0.05);
}

.content-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px 22px;
}

.content-heading h1 {
  margin: 0;
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 650;
  letter-spacing: -0.025em;
}

.content-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sync-status {
  flex: 0 0 auto;
  padding-bottom: 2px;
}

.image-previews {
  display: flex;
  gap: 12px;
  padding: 0 28px 22px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.image-previews[hidden] {
  display: none;
}

.image-preview {
  display: block;
  width: 320px;
  flex: 0 0 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: #f5f7fa;
  text-decoration: none;
  scroll-snap-align: start;
}

.image-preview:hover {
  border-color: #b8c8da;
  box-shadow: 0 4px 14px rgba(31, 42, 55, 0.1);
}

.image-preview:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.image-preview img {
  display: block;
  width: 100%;
  height: 224px;
  object-fit: cover;
  background: #edf1f5;
}

.image-preview span {
  display: block;
  padding: 8px 9px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-header,
.file-row {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 170px 90px;
  align-items: center;
  gap: 20px;
}

.list-header {
  min-height: 40px;
  padding: 0 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  background: #fafbfc;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.file-row {
  width: 100%;
  min-height: 64px;
  padding: 9px 28px;
  border: 0;
  border-bottom: 1px solid #e9edf1;
  outline-offset: -3px;
  color: var(--text);
  background: #fff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 100ms ease;
}

.file-row:last-child {
  border-bottom: 0;
}

.file-row:hover {
  background: var(--surface-hover);
}

.file-row:focus-visible {
  outline: 2px solid var(--blue);
}

.name-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.name-label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.name-label strong,
.name-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-label strong {
  font-size: 15px;
  font-weight: 560;
}

.name-label small {
  color: var(--muted);
  font-size: 12px;
}

.folder-icon {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: var(--folder);
}

.folder-icon::before {
  position: absolute;
  top: -5px;
  left: 2px;
  width: 15px;
  height: 8px;
  content: "";
  border-radius: 4px 4px 0 0;
  background: var(--folder);
}

.file-icon {
  display: grid;
  width: 34px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ccd4dd;
  border-radius: 6px;
  color: #51606f;
  background: #f8fafc;
  font-size: 8px;
  font-weight: 750;
}

.file-pdf {
  border-color: #f1b5ae;
  color: #c62828;
  background: #fff3f2;
}

.file-mp4,
.file-mov {
  border-color: #b8c7f3;
  color: #3f51b5;
  background: #f2f4ff;
}

.thumbnail {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f4f7;
}

.metadata {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  padding: 72px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 17px;
}

.contact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(520px, 1.7fr);
  gap: 42px;
  margin-top: 22px;
  padding: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 8% 10%, rgba(102, 174, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #123f70 0%, #0f3158 62%, #0b294a 100%);
  box-shadow: 0 14px 36px rgba(24, 59, 97, 0.18);
}

.contact::after {
  position: absolute;
  right: -55px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 32px rgba(255, 255, 255, 0.025),
    0 0 0 64px rgba(255, 255, 255, 0.018);
}

.contact-heading p {
  margin: 0 0 5px;
  color: #9dccff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contact-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.025em;
}

.contact-heading address {
  max-width: 300px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
}

.contact-details {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.25fr;
  gap: 12px;
}

.contact-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.065);
}

.contact-group > span {
  margin-bottom: 2px;
  color: #9dccff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.contact-group a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.contact-group a:hover {
  color: #c9e4ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-group a:focus-visible {
  border-radius: 3px;
  outline: 2px solid #a9d5ff;
  outline-offset: 3px;
}

.contact-group small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 500;
}

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

noscript {
  display: block;
  padding: 16px;
  color: #8a1c1c;
  background: #fff0f0;
  text-align: center;
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px 16px;
  }

  .brand {
    max-width: 170px;
  }

  .search {
    height: 44px;
  }

  .search kbd {
    display: none;
  }

  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .content {
    border-radius: 14px;
  }

  .content-heading {
    display: block;
    padding: 21px 18px 17px;
  }

  .sync-status {
    margin-top: 12px !important;
  }

  .image-previews {
    gap: 10px;
    padding: 0 18px 17px;
  }

  .image-preview {
    width: 280px;
    flex-basis: 280px;
  }

  .image-preview img {
    height: 196px;
  }

  .list-header {
    display: none;
  }

  .file-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 65px;
    padding: 11px 18px;
  }

  .file-row .metadata {
    display: none;
  }

  .breadcrumbs {
    margin-bottom: 12px;
  }

  .contact {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 25px 20px;
    border-radius: 14px;
  }

  .contact-details {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
