* {
  box-sizing: border-box;
}
html {
  font-family: -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: #14271f;
  background: #f4f7f4;
  font-size: 16px;
}
body {
  margin: 0;
}
main {
  max-width: 780px;
  margin: auto;
  padding: 12px 16px 32px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}
button,
select,
input,
textarea {
  font: inherit;
}
button,
select,
input[type='number'] {
  min-height: 44px;
}
button,
select {
  border: 1px solid #b8c8bd;
  background: #fff;
  color: #194e37;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 650;
}
button {
  cursor: pointer;
}
button[aria-pressed='true'],
button.main {
  background: #075a37;
  border-color: #075a37;
  color: white;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible,
select:focus-visible {
  outline: 3px solid #b78328;
  outline-offset: 2px;
}
nav button {
  font-size: 0.88rem;
  flex: 1 1 auto;
  padding: 8px;
}
h1 {
  font-size: 1.55rem;
  letter-spacing: -0.035em;
  margin: 8px 0 16px;
}
h2 {
  font-size: 1.07rem;
  margin: 0 0 10px;
}
section,
fieldset {
  border: 1px solid #d6e0d7;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  margin: 0 0 12px;
}
label {
  display: block;
  margin: 8px 0;
  font-weight: 600;
}
label > select,
label > input:not([type='checkbox']),
textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
}
input,
textarea {
  border: 1px solid #a7b8ac;
  border-radius: 8px;
  color: #162b20;
  padding: 8px;
}
input[type='range'] {
  min-height: 40px;
  accent-color: #075a37;
}
textarea {
  min-height: 66px;
  resize: vertical;
}
input[type='checkbox'] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 8px 0 0;
  accent-color: #075a37;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.row label {
  flex: 1;
  min-width: 70px;
}
.small {
  font-size: 0.86rem;
  color: #485d50;
  line-height: 1.45;
}
.photo {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  margin: 9px auto;
  border-radius: 8px;
  touch-action: manipulation;
}
.swatch {
  border: 1px solid #ced9d0;
  padding: 8px;
  border-radius: 10px;
  margin: 10px 0;
}
.file {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8c8bd;
  padding: 9px 12px;
  border-radius: 10px;
  min-height: 44px;
  color: #165637;
  cursor: pointer;
  position: relative;
}
.file:focus-within {
  outline: 3px solid #b78328;
}
.file input {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.matrix {
  overflow-x: auto;
  margin: 10px 0;
}
.matrix table {
  border-spacing: 4px;
}
.matrix th {
  font-size: 0.8rem;
  text-align: left;
  white-space: nowrap;
}
.cell {
  width: 44px;
  padding: 4px;
  min-height: 44px;
}
.cell.balcony {
  background: #d6ecdd;
  color: #164e33;
}
.cell.railing {
  background: #e0e9ff;
  color: #314377;
}
.cell.canopy {
  background: #fff0c9;
  color: #705211;
}
.status {
  min-height: 20px;
  color: #24593a;
}
.status.error {
  color: #a12b19;
}
.actions {
  margin: 16px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
p {
  line-height: 1.45;
}
.qr {
  max-width: 220px;
  width: 78%;
  display: block;
  margin: auto;
}
.url {
  overflow-wrap: anywhere;
}
ul {
  padding-inline-start: 22px;
}
fieldset:disabled {
  opacity: 0.6;
}
body.waiting {
  pointer-events: none;
}
body.waiting main {
  opacity: 0.75;
}

.sitebar,
.project-name {
  max-width: 780px;
  margin: auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sitebar a {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #15583a;
  text-decoration: none;
}
.project-name {
  padding-block: 0;
  font-size: 1.1rem;
  font-weight: 650;
}
.sitebar [hidden] {
  display: none;
}
#printout {
  display: none;
}
@media print {
  @page {
    size: A4;
    margin: 18mm;
  }
  html,
  body {
    background: white;
    color: #12291b;
  }
  body > .sitebar,
  body > .project-name,
  body > main {
    display: none;
  }
  #printout {
    display: block;
  }
  #printout section {
    border: 0;
    padding: 0;
    margin: 0 0 4mm;
    break-inside: avoid;
  }
  #printout h2 {
    font-size: 15pt;
  }
  #printout p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #printout img {
    display: block;
    max-width: 100%;
    max-height: 100mm;
    object-fit: contain;
    margin: 2mm auto;
  }
}
