@font-face {
  font-family: "Inter Display";
  src: url("assets/fonts/InterDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Inter Display";
  src: url("assets/fonts/InterDisplay-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Inter Display";
  src: url("assets/fonts/InterDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-style: normal;
}

body {
  background: #ffffff;
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-family: "Inter Display", Arial, Helvetica, sans-serif;
  color: #171717;
}

#canvasStage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 54px 132px 64px;
  overflow: visible;
  background: #ffffff;
}

#canvasWrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
}

#wordmarkOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

#wordmarkOverlay svg {
  position: absolute;
  overflow: visible;
}

canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  border: 0;
  display: block;
}

#controls {
  width: 360px;
  min-width: 360px;
  background: #ffffff;
  border-right: 1px solid #eeeeee;
  padding: 34px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 12px 0 24px rgba(0, 0, 0, 0.04);
  z-index: 2;
}

#controls h1 {
  font-size: 15px;
  letter-spacing: 0;
  color: #222;
  padding-bottom: 0;
  border-bottom: 0;
  font-weight: 700;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  font-size: 13px;
  color: #9a9a9a;
  font-weight: 700;
}

.intro,
.hint,
.status {
  margin-top: 2px;
  font-size: 13px;
  color: #9a9a9a;
  letter-spacing: 0;
  line-height: 1.35;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title,
.section h2 {
  font-size: 14px;
  letter-spacing: 0;
  color: #303030;
  margin-top: 0;
  font-weight: 700;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pill {
  font-size: 13px;
  color: #777;
  min-width: 44px;
  text-align: right;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.label-row span,
.checkbox-row span {
  font-size: 13px;
  color: #7a7a7a;
  letter-spacing: 0;
  font-weight: 700;
}

.label-row span:last-child {
  color: #777;
  min-width: 44px;
  text-align: right;
}

.control input[type="range"] {
  width: 100%;
  accent-color: #ff48dd;
  height: 2px;
  background: #d9d9d9;
  border: none;
  outline: none;
  cursor: pointer;
}

.control input[type="color"] {
  width: 100%;
  height: 42px;
  border: 1px solid #dadada;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 999px;
}

.divider {
  border: 0;
  border-top: 1px solid #eeeeee;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  background: #ffffff;
  border: 1px solid #dcdcdc;
  color: #111;
  padding: 10px 16px;
  font-family: "Inter Display", Arial, Helvetica, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  flex: 1 1 120px;
}

button:hover {
  background: #f2f2f2;
  border-color: #c8c8c8;
}

button:active {
  background: #ffffff;
  border-color: #999;
}

button.dark {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.palette-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.background-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.background-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 10px;
  min-width: 0;
}

.background-card.active {
  border-color: #111111;
  background: #f7f7f7;
}

.background-swatch {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #d0d0d0;
  flex: 0 0 auto;
}

.background-transparent {
  background:
    linear-gradient(45deg, #f1f1f1 25%, transparent 25%, transparent 75%, #f1f1f1 75%, #f1f1f1),
    linear-gradient(45deg, #f1f1f1 25%, #ffffff 25%, #ffffff 75%, #f1f1f1 75%, #f1f1f1);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
}

.background-label {
  font-size: 12px;
  line-height: 1.2;
  color: #444;
  text-align: left;
  white-space: normal;
}

.layout-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.layout-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  border-radius: 14px;
  padding: 8px;
  min-width: 0;
}

.layout-card.active {
  border-color: #111111;
  background: #f7f7f7;
}

.layout-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.72;
  border: 1px solid #dadada;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  padding: 12px;
  gap: 10px;
  align-items: center;
  justify-items: center;
}

.layout-preview.layout-right {
  grid-template-columns: 0.85fr 1.45fr;
  grid-template-rows: 1fr;
}

.layout-preview.layout-below {
  grid-template-columns: 1fr;
  grid-template-rows: 0.9fr 0.6fr;
}

.layout-icon,
.layout-wordmark {
  display: block;
  background: #111111;
}

.layout-icon {
  width: 42px;
  height: 42px;
}

.layout-wordmark {
  width: 100%;
  height: 16px;
}

.layout-below .layout-wordmark {
  width: 78%;
}

.layout-label {
  font-size: 12px;
  line-height: 1.2;
  color: #444;
  text-align: left;
  white-space: normal;
}

.palette-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  border-radius: 14px;
  padding: 8px;
  min-width: 0;
}

.palette-card.active {
  border-color: #111111;
  background: #f7f7f7;
}

.palette-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 0.72;
  border: 1px solid #dadada;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.palette-preview.one {
  grid-template-columns: 1fr;
}

.palette-preview.two {
  grid-template-columns: repeat(2, 1fr);
}

.palette-preview.four {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.palette-preview span {
  display: block;
  width: 100%;
  height: 100%;
}

.palette-label {
  font-size: 12px;
  line-height: 1.2;
  color: #444;
  text-align: left;
  white-space: normal;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle-chip {
  flex: 1 1 140px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid #dcdcdc;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.toggle-chip.active,
.toggle-chip[aria-pressed="true"] {
  background: #ff48dd;
  border-color: #ff48dd;
  color: #111111;
}

.toggle-chip:hover {
  background: #f6f1f5;
  border-color: #d0c0ca;
}

.toggle-chip.active:hover,
.toggle-chip[aria-pressed="true"]:hover {
  background: #ff48dd;
  border-color: #ff48dd;
}

@media (max-width: 980px) {
  body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  #controls {
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid #eeeeee;
    box-shadow: none;
  }

  #canvasStage {
    padding: 22px;
    min-height: 60vh;
  }
}
