:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e0e8;
  --accent: #176b5d;
  --accent-dark: #115347;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.admin {
  padding: 28px;
}

.admin > * {
  width: min(100%, 1080px);
  margin-inline: auto;
}

.login-panel {
  width: min(100%, 440px);
  margin: 12vh auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 8px;
  font-size: 19px;
}

.muted,
.hint,
.meta {
  color: var(--muted);
}

.hint,
.meta {
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 16px;
}

.panel,
.item,
.media-card,
.empty,
.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  margin-bottom: 20px;
  padding: 20px;
}

.list {
  display: grid;
  gap: 12px;
}

.item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button,
.primary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
}

.button {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.primary:hover {
  background: var(--accent-dark);
}

.danger {
  color: var(--danger);
  border-color: #f5b5b0;
  background: var(--danger-bg);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check input {
  width: auto;
}

.empty,
.alert {
  padding: 16px;
}

.alert {
  margin-bottom: 16px;
  color: var(--danger);
  border-color: #f5b5b0;
  background: var(--danger-bg);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.media-card {
  overflow: hidden;
}

.media-card img,
.media-card video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #101418;
}

.media-info {
  display: grid;
  gap: 4px;
  padding: 12px;
  overflow-wrap: anywhere;
}

.media-info span {
  color: var(--muted);
  font-size: 14px;
}

.convert-status {
  font-weight: 700;
  color: var(--accent) !important;
}

.video-details {
  margin-top: 8px;
}

.video-details summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 10px;
  margin: 10px 0 0;
  font-size: 13px;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.convert-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.convert-actions .button {
  width: 100%;
}

.convert-audio {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.convert-actions .button {
  min-height: 38px;
  padding: 8px;
  font-size: 13px;
}

.upload-progress {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}

.upload-progress-bar {
  width: 0;
  height: 38px;
  background: var(--accent);
  transition: width 0.18s ease;
}

.upload-progress span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-weight: 700;
}

.media-card form {
  padding: 0 12px 12px;
}

.delete-property {
  margin-top: 24px;
}

.public {
  background: #ffffff;
}

.public-page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 22px;
}

.public-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.public-head h1 {
  max-width: 900px;
  font-size: clamp(30px, 7vw, 52px);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.address {
  color: var(--muted);
  font-size: 18px;
}

.description {
  max-width: 820px;
  color: #30394a;
  font-size: 18px;
  line-height: 1.6;
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-media {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #101418;
}

.public-media img,
.public-media video {
  display: block;
  width: 100%;
}

.public-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.public-media.video {
  grid-column: 1 / -1;
}

.public-media video {
  max-height: 78vh;
}

@media (max-width: 720px) {
  .admin {
    padding: 16px;
  }

  .topbar,
  .item,
  .section-title {
    display: grid;
  }

  .actions,
  .button,
  .primary,
  .danger {
    width: 100%;
  }

  .public-page {
    padding: 16px;
  }

  .public-grid {
    grid-template-columns: 1fr;
  }

  .description,
  .address {
    font-size: 16px;
  }
}
