:root {
  color-scheme: dark;
  --bg: #0a0d12;
  --bg-soft: #101620;
  --panel: rgba(20, 29, 42, 0.78);
  --panel-strong: #161f2e;
  --text: #edf3ff;
  --muted: #9aa8bd;
  --line: rgba(157, 178, 209, 0.18);
  --accent: #d6b15f;
  --accent-strong: #f2c96f;
  --danger: #ff6b6b;
  --success: #76e0a3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(214, 177, 95, 0.16), transparent 30%),
    radial-gradient(circle at 86% 6%, rgba(84, 125, 191, 0.16), transparent 34%),
    linear-gradient(135deg, #080a0f 0%, #101620 48%, #090b10 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 177, 95, 0.45);
  border-radius: 14px;
  color: var(--accent-strong);
  background: linear-gradient(145deg, rgba(214, 177, 95, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 26px rgba(214, 177, 95, 0.06);
}

.brand-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-home {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
}

.upload-panel-simple {
  width: min(760px, 100%);
  padding: 18px;
}

.corner-settings {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.corner-settings:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

h1 {
  max-width: 680px;
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.upload-panel {
  padding: 24px;
}

.input,
.inline-editor {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.input {
  height: 46px;
  padding: 0 14px;
}

.dropzone {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 26px;
  border: 1px dashed rgba(214, 177, 95, 0.45);
  border-radius: 24px;
  text-align: center;
  background: rgba(214, 177, 95, 0.06);
  transition: 0.18s ease;
}

.dropzone-primary {
  min-height: min(52vh, 430px);
  border-radius: 30px;
}

.dropzone-primary .dropzone-title {
  font-size: clamp(32px, 7vw, 72px);
  letter-spacing: -0.06em;
}

.dropzone.is-dragging {
  border-color: var(--accent-strong);
  background: rgba(214, 177, 95, 0.14);
  transform: translateY(-2px);
}

.dropzone-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
}

.dropzone-copy {
  margin: 0 auto 18px;
  max-width: 320px;
  color: var(--muted);
  line-height: 1.55;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  color: #15100a;
  background: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.button.ghost {
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.token-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(10px);
}

.token-panel {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.token-panel label {
  color: var(--muted);
  font-size: 13px;
}

.token-close {
  justify-self: end;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.album-header {
  padding: 0 0 14px;
  margin-bottom: 18px;
  background: transparent;
}

.album-header-compact {
  display: flex;
  justify-content: flex-end;
}

.album-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.album-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.editable-empty {
  color: var(--muted);
  font-style: italic;
}

.inline-editable {
  cursor: text;
}

.inline-editor {
  width: min(708px, 100%);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.34);
  outline: none;
}

.inline-editor-area {
  min-height: 94px;
  resize: vertical;
  line-height: 1.45;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  width: min(708px, 100%);
  margin: 0 auto;
}

.evidence-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(12, 17, 25, 0.86);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.26);
}

.evidence-image-wrap {
  width: 100%;
  aspect-ratio: 708 / 240;
  height: auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: #000;
  cursor: default;
}

.evidence-image-wrap.can-open-lightbox {
  cursor: zoom-in;
}

.evidence-image-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.evidence-body {
  padding: 12px 14px;
}

.evidence-description {
  margin: 0 0 10px;
  color: #d9e3f3;
  line-height: 1.45;
  font-size: 14px;
  white-space: pre-wrap;
}

.evidence-description.empty {
  color: var(--muted);
  font-style: italic;
}

.evidence-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.floating-status {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 14px;
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 999px;
  color: var(--text);
  background: rgba(70, 18, 24, 0.94);
  transition: 0.18s ease;
}

.floating-status.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.hidden {
  display: none !important;
}

body.has-lightbox {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(2, 4, 8, 0.86);
  backdrop-filter: blur(14px);
}

.lightbox-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 96vw;
  max-height: 94vh;
  overflow: visible;
  background: transparent;
}

.lightbox-panel img {
  width: auto;
  height: auto;
  max-width: 96vw;
  max-height: 94vh;
  display: block;
  cursor: zoom-out;
}

@media (max-width: 840px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .upload-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .album-title-row {
    display: grid;
  }

  .lightbox {
    padding: 0;
  }

  .lightbox-panel {
    max-width: 98vw;
    max-height: 94vh;
  }

  .lightbox-panel img {
    max-width: 98vw;
    max-height: 94vh;
  }
}
