.clips-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 110px;
}
.clips-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  padding: 42px 0 52px;
  border-bottom: 1px solid var(--line);
}
.clips-hero h1 {
  max-width: none;
  margin-bottom: 16px;
  font-size: clamp(2rem, 5.2vw, 4.3rem);
  line-height: 1.15;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.clips-hero .hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
}
.clips-hero .button {
  flex: 0 0 auto;
}
.clip-create-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.clip-create-actions .button {
  color: var(--text);
  font: inherit;
  cursor: pointer;
  appearance: none;
}
.clip-editor-panel {
  margin: 0 0 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.clip-editor-panel .panel-heading {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.clip-editor-component {
  padding: 18px;
}
.retention-notice {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 28px 0 52px;
  padding: 18px 22px;
  border: 1px solid rgba(116, 130, 255, 0.35);
  border-radius: 14px;
  background: rgba(116, 130, 255, 0.08);
}
.notice-mark {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
}
.retention-notice strong {
  display: block;
}
.retention-notice p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.upload-panel {
  margin-bottom: 64px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.16);
}
.panel-heading,
.feed-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}
.panel-heading h2,
.feed-heading h2 {
  margin-bottom: 0;
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}
#clip-form {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}
#clip-form label:not(.file-drop):not(.visibility-option):not(.consent) {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
#clip-form input[type="text"],
#clip-form input:not([type]),
#clip-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: var(--page);
  font: inherit;
}
.file-drop {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed rgba(116, 130, 255, 0.65);
  border-radius: 12px;
  background: rgba(116, 130, 255, 0.06);
  cursor: pointer;
  text-align: center;
}
.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-title {
  color: var(--accent-light);
  font-weight: 800;
}
#file-detail {
  color: var(--muted);
  font-size: 0.85rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
legend {
  margin-bottom: 8px;
  font-weight: 800;
}
.visibility-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.visibility-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(116, 130, 255, 0.08);
}
.visibility-option input {
  accent-color: var(--accent);
}
.visibility-option span {
  display: grid;
}
.visibility-option small {
  color: var(--muted);
}
.consent {
  display: flex;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.consent input {
  margin-top: 6px;
  accent-color: var(--accent);
}
.submit-button {
  justify-self: start;
  border: 0;
  cursor: pointer;
}
.submit-button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.upload-progress {
  position: relative;
  height: 30px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--page);
}
#upload-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #9c7cff);
  transition: width 0.15s;
}
#upload-progress-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}
.form-status {
  min-height: 1.75em;
  margin: 0;
  color: var(--muted);
}
.form-status.error {
  color: #ff8d8d;
}
.feed-section {
  margin-top: 10px;
}
.feed-heading {
  align-items: end;
  margin-bottom: 28px;
}
.member-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.pending-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.pending-card {
  padding: 14px 16px;
  border: 1px solid rgba(255, 185, 85, 0.35);
  border-radius: 10px;
  background: rgba(255, 185, 85, 0.07);
}
.pending-card strong {
  display: block;
}
.pending-card span {
  color: var(--muted);
  font-size: 0.85rem;
}
.clip-list {
  display: grid;
  gap: 42px;
}
.clip-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.clip-player {
  aspect-ratio: 16/9;
  background: #050505;
}
.clip-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.clip-body {
  padding: 22px 24px 24px;
}
.clip-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.clip-title {
  margin-bottom: 6px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
.clip-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.visibility-badge {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--accent-light);
  background: rgba(116, 130, 255, 0.12);
  font-size: 0.75rem;
  font-weight: 800;
}
.clip-description {
  margin: 15px 0 0;
  white-space: pre-wrap;
}
.clip-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.clip-actions button,
.clip-actions select {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--page);
  font: inherit;
  cursor: pointer;
}
.clip-actions .delete-button {
  margin-left: auto;
}
.clip-edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
}
.clip-edit-form[hidden] {
  display: none;
}
.clip-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.clip-edit-form input,
.clip-edit-form textarea,
.clip-edit-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}
.clip-edit-form .edit-wide {
  grid-column: 1 / -1;
}
.edit-buttons {
  display: flex;
  gap: 10px;
}
.edit-buttons button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}
.edit-buttons .save-button {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.clip-reactions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.like-button {
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--page);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.like-button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: #ff6f91;
}
.like-button.liked {
  color: #fff;
  border-color: #e84d76;
  background: #e84d76;
}
.like-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.like-note {
  color: var(--muted);
  font-size: 0.8rem;
}
.clip-status {
  padding: 32px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
.delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 38px;
  padding: 8px 14px;

  border: 1px solid rgba(255, 92, 92, 0.35);
  border-radius: 9px;

  color: #ff8f8f;
  background: rgba(255, 75, 75, 0.08);

  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;

  cursor: pointer;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.delete-button::before {
  content: "🗑";
  font-size: 0.9em;
}

.delete-button:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 92, 92, 0.7);
  background: rgba(220, 55, 55, 0.8);
  transform: translateY(-1px);
}

.delete-button:active:not(:disabled) {
  transform: translateY(0);
}

.delete-button:disabled {
  cursor: wait;
  opacity: 0.55;
}
@media (max-width: 700px) {
  .clips-page {
    width: min(100% - 24px, 1180px);
    padding-top: 34px;
  }
  .clips-hero {
    align-items: stretch;
    flex-direction: column;
    padding-top: 24px;
  }
  .clips-hero .button {
    width: 100%;
  }
  .clip-create-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .clip-editor-component {
    padding: 10px;
  }
  .retention-notice {
    align-items: flex-start;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .clip-edit-form {
    grid-template-columns: 1fr;
  }
  .clip-edit-form .edit-wide {
    grid-column: auto;
  }
  .feed-heading,
  .clip-topline {
    align-items: flex-start;
    flex-direction: column;
  }
  .clip-body {
    padding: 18px;
  }
}
