body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  color: var(--g);
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
}

.nav a {
  color: var(--text-3);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.mark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--text) !important;
  letter-spacing: -0.3px;
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--g);
  border-radius: var(--radius-full);
  margin: 0 0.5px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.nav-r {
  display: flex;
  gap: 18px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
}

.nav-cta {
  background: var(--g);
  color: #fff !important;
  padding: 5px 13px;
  border-radius: var(--radius-base);
  font-weight: 500;
}

.nav-cta:hover {
  opacity: 0.88;
}

.content {
  padding: var(--space-9) 0;
}

.content h1 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--space-7);
  color: var(--text);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}

.card p {
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.6;
}

.btn-fill {
  display: inline-block;
  background: var(--g);
  color: #fff;
  padding: 7px 18px;
  border-radius: var(--radius-base);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-fill:hover {
  opacity: 0.88;
  text-decoration: none;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--well);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--g);
  background: var(--g-glow);
}

.file-input {
  display: none;
}

.drop-text {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
}

.drop-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.image-view {
  margin-bottom: var(--space-5);
  text-align: center;
}

.view-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.image-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.meta-tag {
  background: var(--g-pale);
  color: var(--g);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.meta-sep {
  color: var(--text-4);
}

.meta-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.inline-form {
  display: inline;
}

.link-btn {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.delete-btn {
  color: #c44;
}

.delete-btn:hover {
  text-decoration: underline;
}

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

.grid-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.grid-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.grid-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.grid-name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

@media (max-width: 640px) {
  .nav-r {
    gap: 12px;
    font-size: 11px;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .meta-row {
    flex-wrap: wrap;
  }
}
