:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #65736b;
  --line: #d8e0da;
  --green: #0f7a48;
  --green-dark: #075f36;
  --blue: #155da8;
  --warning: #9d3d22;
  --shadow: 0 22px 70px rgba(24, 42, 32, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 122, 72, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(21, 93, 168, 0.12), transparent 36%),
    var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px;
}

.tool-panel {
  width: min(100%, 920px);
  padding: 36px;
  background: var(--panel);
  border: 1px solid rgba(216, 224, 218, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #ffffff;
  background: var(--blue);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-name {
  color: var(--muted);
  font-size: 15px;
}

.intro {
  max-width: 620px;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
}

.notice {
  margin: 0 0 18px;
  padding: 13px 14px;
  color: var(--warning);
  background: #fff4ef;
  border: 1px solid #efc7b8;
  border-radius: 6px;
  font-size: 14px;
}

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

.choice-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 22px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 10px 30px rgba(24, 42, 32, 0.07);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 16px 40px rgba(24, 42, 32, 0.13);
  transform: translateY(-2px);
}

.choice-card.is-active {
  border-color: var(--green);
  background: #f6fbf8;
  box-shadow: 0 16px 42px rgba(15, 122, 72, 0.16);
}

.choice-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: var(--green);
  background: #e8f4ed;
  border-radius: 8px;
}

.choice-title,
.choice-copy {
  display: block;
}

.choice-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.choice-copy {
  color: var(--muted);
  font-size: 14px;
}

.upload-form {
  display: grid;
  gap: 18px;
}

.tool-mode[hidden] {
  display: none;
}

.tool-mode.is-active {
  animation: reveal-tool 180ms ease-out;
}

@keyframes reveal-tool {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drop-zone {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  border: 2px dashed #aec3b6;
  border-radius: 8px;
  background: #fbfdfc;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--green);
  background: #f4fbf7;
}

.drop-zone:focus-within {
  outline: 3px solid rgba(15, 122, 72, 0.18);
  outline-offset: 3px;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
  place-items: center;
  color: var(--green);
  background: #e8f4ed;
  border-radius: 50%;
}

.drop-title {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

.drop-copy,
.drop-limit {
  display: block;
  max-width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.drop-copy {
  margin-top: 4px;
}

.drop-limit {
  margin-top: 10px;
  font-size: 13px;
}

.quality-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.quality-group legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 14px;
}

.quality-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: #ffffff;
}

.quality-group input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

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

.text-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.text-field input,
.text-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.text-field input:focus,
.text-field select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(15, 122, 72, 0.16);
}

.submit-button {
  min-height: 54px;
  padding: 14px 18px;
  color: #ffffff;
  background: var(--green);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.submit-button:hover {
  background: var(--green-dark);
}

.submit-button:active {
  transform: translateY(1px);
}

.submit-button[disabled] {
  cursor: wait;
  opacity: 0.78;
}

.button-loading,
.is-submitting .button-ready {
  display: none;
}

.is-submitting .button-loading {
  display: inline;
}

.privacy-note {
  margin-top: 18px;
  font-size: 13px;
}

@media (max-width: 620px) {
  .page-shell {
    padding: 14px;
  }

  .tool-panel {
    padding: 24px 18px;
  }

  .brand-row {
    margin-bottom: 22px;
  }

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

  .choice-card {
    min-height: 140px;
    padding: 18px;
  }

  .quality-group {
    grid-template-columns: 1fr;
  }

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

  .drop-zone {
    min-height: 210px;
    padding: 22px 16px;
  }
}
