.gm-materials {
  --gm-accent: #ffba63;
  --gm-muted: #a2acbc;
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #3b4353;
  border-radius: 20px;
  background: #171c27;
  color: #f0f3f9;
  box-shadow: 0 28px 100px #0009;
  font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
  overflow: auto;
}
.gm-materials::backdrop { background: #070b15c9; backdrop-filter: blur(6px); }
.gm-materials [hidden] { display: none !important; }
.gm-materials * { box-sizing: border-box; }
.gm-materials h2, .gm-materials h3, .gm-materials p { margin: 0; font-family: inherit; color: inherit; }
.gm-materials button, .gm-materials input { font: inherit; }
.gm-materials button { cursor: pointer; }
.gm-materials button:focus-visible { outline: 2px solid var(--gm-accent); outline-offset: 3px; }
.gm-materials svg { width: 22px; height: 22px; flex-shrink: 0; }
.gm-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #ffffff12; }
.gm-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gm-header-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffba6340; border-radius: 12px; background: #ffba6310; color: var(--gm-accent); }
.gm-materials .gm-heading h2 { font-size: 19px; font-weight: 650; line-height: 1.3; }
.gm-materials .gm-heading p { margin-top: 3px; font-size: 12px; color: var(--gm-muted); }
.gm-icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #ffffff19; border-radius: 11px; background: #ffffff05; color: #edf1f7; flex-shrink: 0; transition: background .15s; }
.gm-icon-button:hover { background: #ffffff12; }
.gm-icon-button:disabled { opacity: .3; cursor: default; }
.gm-gate { padding: 28px 32px 32px; }
.gm-materials .gm-gate h3 { font-size: 23px; font-weight: 600; margin-bottom: 8px; }
.gm-materials .gm-gate > p { color: var(--gm-muted); }
.gm-gate form { margin-top: 24px; }
.gm-gate label { display: block; margin-bottom: 8px; font-size: 13px; }
.gm-gate input { display: block; width: 100%; padding: 13px 14px; border: 1px solid #485365; border-radius: 11px; background: #0f1420; color: #fff; font-size: 16px; outline: none; }
.gm-gate input:focus { border-color: var(--gm-accent); box-shadow: 0 0 0 3px #ffba6318; }
.gm-gate input[aria-invalid=true] { border-color: #ff8a8a; }
.gm-materials .gm-error { min-height: 28px; padding-top: 5px; color: #ff9f9f; font-size: 12px; }
.gm-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: 11px; background: var(--gm-accent); color: #211908; font-weight: 650 !important; }
.gm-primary:hover { background: #ffca85; }
.gm-materials.gm-unlocked { width: min(1180px, calc(100vw - 40px)); height: min(800px, calc(100dvh - 40px)); overflow: hidden; }
.gm-materials.gm-unlocked[open] { display: flex; flex-direction: column; }
.gm-unlocked .gm-header { flex-shrink: 0; }
.gm-browser { display: grid; grid-template-columns: 242px minmax(0, 1fr); flex: 1; min-height: 0; }
.gm-files { min-height: 0; padding: 20px 12px; border-right: 1px solid #ffffff12; overflow-y: auto; }
.gm-files-label { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 16px; color: var(--gm-muted); font-size: 10px; letter-spacing: 1.2px; }
.gm-files-label span { letter-spacing: 0; font-size: 11px; }
.gm-file-list { display: flex; flex-direction: column; gap: 8px; }
.gm-file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; color: #c2cbda; }
.gm-file:hover { background: #ffffff06; }
.gm-file[aria-pressed=true] { background: #ffba6310; border-color: #ffba6360; color: #fff; }
.gm-thumbnail { display: grid; place-items: center; width: 40px; height: 48px; flex-shrink: 0; overflow: hidden; border-radius: 6px; background: #303846; color: var(--gm-accent); }
.gm-thumbnail img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gm-file-details { display: block; min-width: 0; }
.gm-file-details strong { display: block; font-size: 12px; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.gm-file-details small { display: block; margin-top: 4px; color: var(--gm-muted); font-size: 10px; }
.gm-preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.gm-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; flex-shrink: 0; }
.gm-materials .gm-preview-heading h3 { font-size: 14px; font-weight: 550; line-height: 1.4; }
#gm-counter { font-size: 12px; color: var(--gm-muted); white-space: nowrap; }
.gm-stage { flex: 1; min-height: 0; overflow: auto; background: #0b1019; overscroll-behavior: contain; }
.gm-stage-inner { display: flex; align-items: center; justify-content: center; width: max-content; min-width: 100%; min-height: 100%; padding: 16px; }
.gm-image { display: block; max-width: none; height: auto; flex-shrink: 0; border-radius: 2px; box-shadow: 0 6px 24px #0008; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gm-video { display: block; width: min(100%, 900px); max-height: 100%; object-fit: contain; background: #000; }
.gm-stage-inner:has(.gm-video) { width: 100%; height: 100%; flex-direction: column; }
.gm-materials .gm-media-status { color: var(--gm-muted); font-size: 13px; padding: 20px; text-align: center; }
.gm-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid #ffffff12; flex-shrink: 0; }
.gm-navigation, .gm-zoom { display: flex; align-items: center; gap: 6px; }
#gm-scale { min-width: 24px; text-align: center; font-size: 12px; color: var(--gm-muted); }
.gm-view-only { font-size: 11px; color: var(--gm-muted); }
@media (max-width: 680px) {
  .gm-materials { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
  .gm-header { padding: 14px 16px; }
  .gm-gate { padding: 24px; }
  .gm-materials.gm-unlocked { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .gm-unlocked .gm-header { padding: 12px 14px; }
  .gm-browser { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .gm-files { padding: 10px 12px; border-right: 0; border-bottom: 1px solid #ffffff12; overflow: hidden; }
  .gm-files-label { display: none; }
  .gm-file-list { display: flex; flex-direction: row; overflow-x: auto; padding: 2px 0 5px; scroll-snap-type: x proximity; }
  .gm-file { flex: 0 0 154px; padding: 8px; scroll-snap-align: start; gap: 8px; }
  .gm-thumbnail { width: 28px; height: 36px; }
  .gm-file-details strong { font-size: 10px; }
  .gm-file-details small { font-size: 9px; margin-top: 2px; }
  .gm-preview-heading { padding: 12px 14px; }
  .gm-materials .gm-preview-heading h3 { font-size: 12px; }
  .gm-toolbar { gap: 6px; padding: 10px 12px; flex-wrap: wrap; }
  .gm-zoom { gap: 3px; }
  .gm-view-only { display: none; }
  .gm-icon-button { width: 40px; height: 42px; }
}
@media (max-height: 480px) and (min-width: 681px) {
  .gm-unlocked .gm-header { padding: 10px 16px; }
  .gm-preview-heading { padding: 8px 16px; }
  .gm-toolbar { padding: 8px 16px; }
}
