:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --ink: #17202a;
  --muted: #5d6b7a;
  --line: #d7dde4;
  --accent: #0b6b64;
  --accent-dark: #084f4a;
  --danger: #a83232;
  --panel: #ffffff;
  --soft: #eaf4f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.secondary {
  background: #dfe8e7;
  color: var(--accent-dark);
}

.secondary:hover {
  background: #ccdcda;
}

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

.intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.workspace {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
}

.upload-panel,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.dropzone {
  align-items: center;
  background: var(--soft);
  border: 2px dashed #94b9b4;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding: 28px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone.dragging,
.dropzone:focus-visible {
  background: #dbeeea;
  border-color: var(--accent);
  outline: 3px solid rgba(11, 107, 100, 0.16);
}

.dropzone input {
  display: none;
}

.drop-icon {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  display: flex;
  font-size: 2rem;
  font-weight: 300;
  height: 72px;
  justify-content: center;
  margin-bottom: 18px;
  width: 72px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.status {
  margin: 12px 0 0;
  min-height: 24px;
}

.preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.preview.empty {
  color: var(--muted);
  display: block;
}

.thumb {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  padding: 8px;
}

.thumb img {
  aspect-ratio: 1;
  border-radius: 6px;
  height: 72px;
  object-fit: cover;
  width: 72px;
}

.thumb strong,
.thumb span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb span {
  color: var(--muted);
  font-size: 0.86rem;
}

.remove {
  background: #f1f3f5;
  color: var(--ink);
  min-height: 36px;
  padding: 0 10px;
}

.consent-dialog {
  border: 0;
  border-radius: 8px;
  max-height: min(860px, calc(100vh - 32px));
  padding: 0;
  width: min(860px, calc(100vw - 24px));
}

.consent-dialog::backdrop {
  background: rgba(10, 18, 28, 0.58);
}

.consent-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.dialog-header {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.icon-button {
  background: #eef1f4;
  color: var(--ink);
  min-height: 36px;
  min-width: 36px;
  padding: 0;
}

.legal-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 14px;
}

.legal-copy p {
  margin: 0 0 12px;
}

.checks {
  display: grid;
  gap: 10px;
}

.check {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr);
}

.check input {
  margin-top: 4px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-weight: 700;
}

.field input,
.field select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 9px 11px;
  width: 100%;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
}

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

@media (max-width: 820px) {
  .shell {
    width: min(100% - 20px, 720px);
    padding: 24px 0;
  }

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

  .dropzone {
    min-height: 280px;
  }
}
