:root {
  color-scheme: light;
  --bg: #f3f6f1;
  --ink: #18201b;
  --muted: #627067;
  --line: #d6ddd1;
  --panel: #ffffff;
  --accent: #19715b;
  --accent-dark: #10503f;
  --warn: #aa3f2d;
  --soft: #e7f1ed;
  --shadow: 0 18px 48px rgba(28, 39, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(25, 113, 91, 0.12), rgba(236, 196, 83, 0.14)),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

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

.workspace {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(214, 221, 209, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.masthead,
.panel-heading,
.summary,
.settings-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.98;
}

h2 {
  font-size: 1.05rem;
}

.panel-heading p,
.notice,
.drop-sub {
  color: var(--muted);
}

.icon-button,
button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 1.35rem;
}

button {
  padding: 0 18px;
}

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

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.meter-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.status {
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  white-space: nowrap;
}

.status.error {
  background: #fae8e3;
  color: var(--warn);
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #9db1a8;
  border-radius: 8px;
  background: #f7faf6;
  cursor: pointer;
  padding: 18px;
  text-align: center;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-main,
.drop-sub {
  display: block;
}

.drop-main {
  color: var(--accent-dark);
  font-weight: 850;
}

.drop-sub {
  margin-top: 4px;
  font-size: 0.9rem;
}

.preview-frame {
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: #111815;
}

.preview-frame img {
  display: none;
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.preview-frame img[src] {
  display: block;
}

.reading-field,
.price-field {
  display: grid;
  gap: 8px;
}

.reading-field label,
.price-field span,
.summary-item span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.reading-field input,
.price-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 10px 12px;
}

.settings-strip {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
}

.settings-note {
  color: var(--muted);
  font-weight: 750;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 750;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.summary {
  margin-top: 18px;
  border-radius: 8px;
  background: #17211c;
  color: #fff;
  padding: 18px;
}

.summary-item {
  display: grid;
  gap: 6px;
}

.summary-item span,
.summary .price-field span {
  color: #b9c8bf;
}

.summary strong {
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  line-height: 1;
}

.summary .price-field {
  width: min(260px, 100%);
}

.summary .price-field input {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.total strong {
  color: #8de0c8;
}

.notice {
  margin-top: 14px;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .workspace {
    padding: 18px;
  }

  .meter-grid,
  .summary {
    grid-template-columns: 1fr;
  }

  .meter-grid {
    display: grid;
  }

  .summary,
  .settings-strip,
  .masthead {
    align-items: stretch;
    flex-direction: column;
  }

  .icon-button {
    align-self: flex-end;
  }

  .preview-frame {
    min-height: 220px;
  }
}
