:root {
  --bg: #f2f4f8;
  --panel: #ffffff;
  --ink: #1b2430;
  --muted: #6b7788;
  --line: #d7dee8;
  --blue: #2f6fd6;
  --blue-soft: #eaf3ff;
  --shadow: 0 18px 50px rgba(39, 55, 77, 0.12);
}

@font-face {
  font-family: "Geist";
  src: url("./geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  padding: 28px;
}

.hero {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

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

.button,
.list-head button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.reference-generator {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
}

.dropzone {
  min-height: 130px;
  border: 1px dashed #8db7ed;
  border-radius: 8px;
  background: var(--blue-soft);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  cursor: pointer;
}

.dropzone strong,
.dropzone span {
  display: block;
}

.dropzone strong {
  color: var(--blue);
  font-size: 20px;
}

.dropzone input {
  display: none;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
input[type="range"],
input[type="number"],
input[type="date"],
input[type="text"] {
  width: 100%;
}

select,
input[type="number"],
input[type="date"],
input[type="text"] {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-head button {
  min-height: 34px;
  padding: 7px 10px;
  color: #c32f2f;
}

.thumb-list {
  display: grid;
  gap: 8px;
  max-height: 380px;
  overflow: auto;
}

.thumb {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfdff;
}

.thumb img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #e9eef5;
}

.reference-icon {
  width: 58px;
  height: 58px;
  border: 1px solid #8db7ed;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.thumb strong,
.thumb small {
  display: block;
}

.thumb strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.thumb small {
  margin-top: 3px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #c32f2f;
  padding: 7px 9px;
  cursor: pointer;
}

.preview-panel {
  padding: 18px;
  overflow: auto;
}

canvas {
  display: block;
  width: min(100%, 1080px);
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 980px) {
  .hero,
  .workspace {
    grid-template-columns: 1fr;
    display: grid;
  }

  .workspace {
    grid-template-columns: 1fr;
  }
}
