:root {
  --bg: #0f1114;
  --panel: #181b20;
  --panel-2: #20242a;
  --text: #f4f1e8;
  --muted: #b4b1a8;
  --line: rgba(255,255,255,0.1);
  --accent: #f28c28;
  --success: #4db88a;
  --warn: #f0b04a;
  --danger: #e76f6f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #0f1114, #14181e 30%, #0f1114);
  color: var(--text);
}
.app-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
h1, h2, h3 { margin: 0; font-weight: 700; }
h1 { font-size: clamp(28px, 5vw, 46px); margin-bottom: 10px; }
h2 { font-size: 20px; margin-bottom: 14px; }
h3 { font-size: 16px; margin-bottom: 12px; }
.lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.hero-badge {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 280px;
}
.badge-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.badge-value {
  font-size: 15px;
  line-height: 1.4;
}
.grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 18px;
  margin-bottom: 18px;
}
.panel {
  background: rgba(24,27,32,0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(8px);
}
.controls-panel { min-width: 0; }
.control-group { margin-bottom: 14px; }
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
select, button {
  font: inherit;
}
select {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
button {
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}
button.primary {
  background: var(--accent);
  color: #111;
  border-color: transparent;
  font-weight: 700;
}
.pattern-stage {
  background: #0d0f12;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
#patternCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #0f1114;
  cursor: move;
}
.microcopy {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  background: var(--panel-2);
}
.status-pill.success { color: #0d1a12; background: var(--success); border-color: transparent; }
.status-pill.warn { color: #2e1c00; background: var(--warn); border-color: transparent; }
.status-pill.danger { color: #2b1010; background: var(--danger); border-color: transparent; }
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.result-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.result-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.result-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.meta-card {
  background: linear-gradient(180deg, rgba(242,140,40,0.16), rgba(242,140,40,0.04));
  border: 1px solid rgba(242,140,40,0.28);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
}
.meta-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.meta-card-body {
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.mockup-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.mockup-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.mockup {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #222;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.mockup.textile {
  border-radius: 16px;
  border: 10px solid #ddd6c8;
}
.mockup.car {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #2e3139, #1a1c21);
}
.mockup.car::before {
  content: "";
  position: absolute;
  inset: 18% 8% 22% 8%;
  background: rgba(244,241,232,0.07);
  border-radius: 34px 44px 16px 16px;
}
.mockup.car::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 14%;
  height: 16%;
  border-radius: 24px;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.18);
}
.mockup.fish {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, #0d1f2d, #10283b);
}
.mockup.fish::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 24%;
  top: 28%;
  bottom: 28%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  clip-path: ellipse(50% 40% at 50% 50%);
}
.mockup.fish::after {
  content: "";
  position: absolute;
  right: 11%;
  top: 35%;
  width: 22%;
  height: 30%;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.note-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}
.note-panel strong { color: var(--text); }
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .result-grid,
  .mockup-grid { grid-template-columns: 1fr; }
  .app-shell { width: min(100vw - 20px, 1240px); }
}