body.rsd-page {
  margin: 0;
  background: var(--ow-bg, #fdfdfc);
  color: var(--ow-text, #232323);
  font-family: var(--ow-font-body, Georgia, 'Times New Roman', serif);
}

.rsd-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.rsd-header { margin-bottom: 2.5rem; }
.rsd-kicker {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  opacity: 0.55;
  margin: 0 0 0.4rem;
  font-family: var(--ow-font-ui, system-ui, sans-serif);
  font-weight: 600;
}
.rsd-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0;
}

.rsd-intro {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.rsd-empty {
  opacity: 0.6;
  font-style: italic;
}

.rsd-section { margin-bottom: 3rem; }
.rsd-section:last-child { margin-bottom: 0; }
.rsd-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 1px solid var(--ow-border, #e2e2e0);
  padding-bottom: 0.6rem;
  margin: 0 0 1.1rem;
  font-family: var(--ow-font-ui, system-ui, sans-serif);
}

.rsd-list {
  display: flex;
  flex-direction: column;
}

.rsd-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--ow-border, #e6e6e3);
}
.rsd-item:first-child { border-top: 1px solid var(--ow-border, #e6e6e3); }

.rsd-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
}

.rsd-item-main {
  flex: 1;
  min-width: 0;
}

.rsd-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--ow-font-ui, system-ui, sans-serif);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsd-item-desc {
  font-size: 0.76rem;
  opacity: 0.6;
  margin-top: 0.15rem;
  font-family: var(--ow-font-ui, system-ui, sans-serif);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsd-item-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.4rem;
}

.rsd-btn {
  text-align: center;
  padding: 0.4rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none !important;
  font-family: var(--ow-font-ui, system-ui, sans-serif);
  transition: opacity 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.rsd-btn:hover { opacity: 0.85; }
.rsd-btn-view {
  background: var(--ow-text, #232323);
  color: #fff !important;
}
.rsd-btn-download {
  border: 1px solid var(--ow-border, #ccc);
  color: var(--ow-text, #232323) !important;
  background: transparent;
}

/* Password-protected view */
.rsd-locked form.post-password-form {
  margin-top: 1.5rem;
  font-family: var(--ow-font-ui, system-ui, sans-serif);
}
.rsd-locked form.post-password-form input[type="password"] {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--ow-border, #ccc);
  border-radius: 4px;
  margin-right: 0.5rem;
}
.rsd-locked form.post-password-form input[type="submit"] {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: var(--ow-text, #232323);
  color: #fff;
  cursor: pointer;
}

/* Lightbox */
.rsd-lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.rsd-lightbox.rsd-lightbox-open { display: flex; }
.rsd-lightbox-inner {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
}
.rsd-lightbox-inner img,
.rsd-lightbox-inner video {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 4px;
  display: block;
}
.rsd-lightbox-inner iframe {
  width: min(92vw, 900px);
  height: 88vh;
  border: none;
  background: #fff;
  border-radius: 4px;
}
.rsd-lightbox-close {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  background: none; border: none;
  color: #fff; font-size: 2.2rem;
  line-height: 1; cursor: pointer;
  opacity: 0.8;
}
.rsd-lightbox-close:hover { opacity: 1; }

@media (max-width: 600px) {
  .rsd-wrap { padding: 2.5rem 1.1rem 3.5rem; }
  .rsd-item { flex-wrap: wrap; }
  .rsd-item-main { flex-basis: 100%; order: 1; }
  .rsd-icon { order: 0; }
  .rsd-item-actions { order: 2; flex-basis: 100%; margin-top: 0.5rem; margin-left: calc(30px + 0.85rem); width: auto; }
  .rsd-btn { flex: 1; }
}
