:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2933;
  background: #e9ecef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.preview {
  position: sticky;
  top: 0;
  min-width: 0;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  background: #dfe3e6;
}

.stage-shell {
  width: min(100%, 1400px);
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2000 / 1181;
  overflow: hidden;
  background: #f7f7f7;
  border: 1px solid #c8cdd2;
}

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.sidebar {
  min-height: 100vh;
  overflow: auto;
  padding: 20px;
  background: #ffffff;
  border-left: 1px solid #c8cdd2;
}

.sidebar-header {
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

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

h2 {
  margin-bottom: 10px;
  font-size: 15px;
}

#status {
  margin-top: 6px;
  font-size: 13px;
  color: #66717d;
}

.price-panel {
  padding: 14px 0 16px;
  border-top: 1px solid #dde1e5;
}

.price {
  min-height: 34px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}

.price-meta {
  min-height: 18px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: #66717d;
}

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

.controls section,
.debug {
  padding-top: 16px;
  border-top: 1px solid #dde1e5;
}

label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: #52606d;
}

.layer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layer-toggle input {
  flex: 0 0 auto;
}

select {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #aeb7c0;
  border-radius: 4px;
  background: #ffffff;
  color: #1f2933;
}

.debug {
  margin-top: 22px;
  font-size: 12px;
  color: #52606d;
}

.debug ol {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding-left: 0;
  list-style: none;
}

.debug li {
  margin: 0;
}

.small-button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #aeb7c0;
  border-radius: 4px;
  background: #f8fafc;
  color: #1f2933;
  cursor: pointer;
}

.layer-item {
  padding: 8px;
  border: 1px solid #dde1e5;
  border-radius: 4px;
}

.layer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.layer-paths {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.layer-paths code {
  color: #1f2933;
}

.missing {
  margin-top: 12px;
  color: #9a3412;
  line-height: 1.4;
}

.missing ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

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

  .preview {
    position: static;
    height: auto;
    min-height: 0;
    padding: 12px;
  }

  .sidebar {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid #c8cdd2;
  }
}
