:root {
  color: #171717;
  background: #f4f4f4;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.app {
  width: 100%;
  text-align: center;
}

.us-btw-widget {
  width: 100%;
  margin-inline: auto;
}

h1 { margin: 0; font-size: 2rem; }
.subtitle { margin: 4px 0 20px; color: #666; }

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

label, .picker { display: grid; gap: 6px; font-weight: 700; position: relative; }
select, button {
  min-height: 42px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  font: inherit;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  font: inherit;
}

.options {
  display: none;
  position: absolute;
  z-index: 2;
  top: 72px;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #bbb;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
}

.options.open { display: block; }
.option {
  display: block;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  background: white;
  color: #171717;
  text-align: left;
  cursor: pointer;
}

.option:hover, .option:focus { background: #eee; }

.preview-wrap {
  width: min(100%, 447px);
  margin: 0 auto 16px;
  box-shadow: 0 3px 14px rgb(0 0 0 / 12%);
}

canvas { display: block; width: 100%; height: auto; }

button {
  cursor: pointer;
  border-color: #171717;
  background: #171717;
  color: white;
  padding-inline: 18px;
}

button:hover { background: #333; }
.status { min-height: 1.25em; color: #b00020; }

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