:root {
  --bg: #f4f4f1;
  --panel: #ffffff;
  --line: #d8d6d0;
  --text: #1a1a18;
  --muted: #66645e;
  --accent: #111111;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  font-family: Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-size: 11px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-size: 18px;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 46rem;
  line-height: 1.65;
}

.hero-note,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-note {
  padding: 18px 20px;
}

.hero-note p {
  margin: 0 0 10px;
  font-weight: 700;
}

.hero-note ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}


.install-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.install-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.install-actions {
  display: grid;
  align-content: center;
  gap: 12px;
}

.keyword-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.keyword-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.keyword-form {
  display: grid;
  gap: 12px;
}

.keyword-wrap {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.keyword-wrap span {
  font-size: 13px;
  color: var(--muted);
}

.keyword-wrap input {
  border: 0;
  outline: none;
  font: inherit;
  font-size: 18px;
  background: transparent;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr);
  gap: 18px;
  padding: 18px;
  margin-bottom: 18px;
  transition: opacity 0.2s ease;
}

.upload-panel.locked {
  opacity: 0.58;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1.5px dashed #b9b6ae;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  background: #faf9f6;
  cursor: pointer;
}

.dropzone.disabled {
  cursor: not-allowed;
}

.dropzone.dragover {
  background: #efeee8;
  border-color: #8c887d;
}

.dropzone input { display: none; }
.dropzone-title {
  font-size: 22px;
  font-weight: 700;
}
.dropzone-sub {
  margin-top: 8px;
  color: var(--muted);
}

.controls {
  display: grid;
  gap: 14px;
}

.status-row,
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.button-row.compact {
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #111;
  color: white;
  font-size: 13px;
}

.muted { color: var(--muted); }

.slider-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

input[type="range"] {
  width: 100%;
}

button {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  background: white;
  cursor: pointer;
  font: inherit;
}

button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

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

.analysis-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfbf8;
}

.analysis-box h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.analysis-summary {
  margin: 0 0 16px;
  line-height: 1.65;
}

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

.analysis-grid div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.analysis-grid dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.analysis-grid dd {
  margin: 0;
  line-height: 1.55;
}

.preview-panel {
  padding: 18px;
}

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

.canvas-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fcfcfa;
  padding: 14px;
}

.canvas-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

canvas {
  width: 100%;
  display: block;
  border-radius: 12px;
  background: #efede7;
}

@media (max-width: 900px) {
  .hero,
  .install-panel,
  .keyword-panel,
  .upload-panel,
  .canvas-wrap {
    grid-template-columns: 1fr;
  }

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


@supports (padding: max(0px)) {
  .app-shell {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
}

.keyword-wrap input:disabled {
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
}

.keyword-wrap input:disabled::placeholder {
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
}

.keyword-wrap input[type="password"] { letter-spacing: 0.08em; }
