:root {
  color-scheme: light;
  --ink: #222429;
  --muted: #68707d;
  --line: #dfe4ea;
  --panel: #ffffff;
  --page: #f5f7fa;
  --accent: #2f7d68;
  --accent-strong: #226553;
  --danger: #b42318;
  --shadow: 0 18px 54px rgba(22, 34, 51, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.control-panel {
  padding: 22px;
}

.brand-row,
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.1;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef8f4;
  color: var(--accent-strong);
  font-size: 13px;
  white-space: nowrap;
}

.badge.error {
  background: #fff1f0;
  color: var(--danger);
}

.form-grid {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

input,
select,
button {
  width: 100%;
  min-height: 42px;
  border-radius: 7px;
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

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

.upload-zone {
  min-height: 130px;
  border: 1px dashed #a8b2bd;
  border-radius: 8px;
  align-content: center;
  justify-items: center;
  text-align: center;
  cursor: pointer;
  background: #fbfcfd;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.upload-name {
  color: var(--muted);
  font-size: 13px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-panel {
  min-height: calc(100vh - 48px);
  padding: 22px;
}

.zip-link {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.zip-link.disabled {
  pointer-events: none;
  opacity: 0.45;
}

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

.result-grid.empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

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

.sticker-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.sticker-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background:
    linear-gradient(45deg, #f3f5f8 25%, transparent 25%),
    linear-gradient(-45deg, #f3f5f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f5f8 75%),
    linear-gradient(-45deg, transparent 75%, #f3f5f8 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

.sticker-meta {
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.sticker-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.sticker-meta a {
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .result-panel {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100vw - 20px, 1180px);
    margin: 10px auto;
  }

  .control-panel,
  .result-panel {
    padding: 16px;
  }

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