:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f7;
  color: #18212f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 16px;
}

.panel,
.results-panel {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(22, 34, 51, 0.08);
}

.panel {
  padding: 16px;
}

.panel-title,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title span {
  font-size: 18px;
  font-weight: 700;
}

.panel-title strong,
#statusText {
  color: #136f63;
  font-size: 13px;
}

.upload-zone,
.photo-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 154px;
  border: 1px dashed #9fb0c6;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
}

.upload-zone input,
.photo-drop input,
.gallery-link input {
  display: none;
}

.upload-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.field {
  display: grid;
  gap: 6px;
  margin: 14px 0;
}

.field label {
  color: #526173;
  font-size: 13px;
}

input[type="url"],
textarea {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 7px;
  padding: 11px 12px;
  background: #fff;
  color: #18212f;
}

.photo-drop {
  min-height: 238px;
  overflow: hidden;
  position: relative;
}

.photo-drop img {
  display: none;
  width: 100%;
  height: 238px;
  object-fit: contain;
  background: #f8fafc;
}

.photo-drop.has-image img {
  display: block;
}

.photo-drop.has-image span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
}

textarea {
  margin: 12px 0;
  resize: vertical;
}

.gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #e8eef6;
  color: #1f2a3a;
  cursor: pointer;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  width: 100%;
  padding: 13px 16px;
  background: #0f172a;
  color: #fff;
}

.secondary-button,
.icon-button {
  padding: 10px 12px;
  background: #e8eef6;
  color: #1f2a3a;
}

.results-panel {
  margin-top: 16px;
  padding: 18px;
}

.section-head h1 {
  margin: 0;
  font-size: 22px;
}

.analysis-box {
  min-height: 74px;
  padding: 14px;
  border-radius: 8px;
  background: #f6f8fb;
  border: 1px solid #e0e7f0;
  color: #35445a;
  line-height: 1.55;
  white-space: pre-wrap;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.result-card {
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.result-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef2f7;
}

.result-body {
  padding: 12px;
}

.score {
  color: #136f63;
  font-weight: 800;
  font-size: 13px;
}

.result-body h2 {
  margin: 6px 0 8px;
  font-size: 16px;
  line-height: 1.25;
}

.meta {
  display: grid;
  gap: 5px;
  color: #526173;
  font-size: 13px;
}

@media (max-width: 780px) {
  .app-shell {
    padding: 12px;
  }

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