* { box-sizing: border-box; }

body {
  margin: 0;
  background: #000;
  color: #f2f2f2;
  font-family: "IBM Plex Sans", "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.shell {
  width: min(760px, 96vw);
  margin: 0 auto;
  padding: 12px 16px 28px;
  border: 1px solid #2a3d52;
}

h1 {
  margin: 0 0 14px;
  font-size: 1.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

p {
  margin: 10px 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

label {
  display: block;
  margin: 20px 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid #666;
  background: #2f2f2f;
  color: #f0f0f0;
  font-size: 0.95rem;
  line-height: 1.35;
  padding: 8px;
}

textarea {
  resize: vertical;
}

.btn {
  margin-top: 14px;
  border: 1px solid #bbb;
  background: #efefef;
  color: #111;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
}

h2 {
  margin: 20px 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "IBM Plex Sans", "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.3;
}

.output-legend {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #c9c9c9;
}

.preview-image {
  margin-top: 0;
  max-width: 100%;
  height: auto;
  display: block;
}

.alert {
  margin-top: 14px;
  font-size: 0.9rem;
  padding: 10px;
  border: 1px solid;
}

.error {
  border-color: #b14545;
  color: #ffd9d9;
}

.info {
  border-color: #618dbb;
  color: #d7e9ff;
}


.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  transform: scale(1.15);
}

.preview-wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
}

.crown-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.crown-overlay path {
  fill: none;
  stroke: #ffd500;
  stroke-width: 3;
  stroke-linejoin: round;
}

.input-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #bfbfbf;
}
