@font-face {
  font-family: "Pretendard";
  src: url("assets/PretendardVariable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --content-width: 560px;
  --sidebar-width: 44px;
  --text: #1f2328;
  --text-secondary: #59636e;
  --neutral-3: #818b98;
  --placeholder: #bac1c7;
  --border: #d1d9e0;
  --surface: #f6f8fa;
  --sidebar: #fcfcfc;
  --blue: #0088ff;
  --blue-rest: #e9f2fa;
  --red: #d1242f;
  --green: #00a661;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 1024px;
  min-height: 100%;
  background: #fff;
  color: var(--text);
  font-family: "Pretendard", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.app-shell,
.page {
  min-height: max(810px, 100vh);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  min-height: 810px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar__item,
.sidebar__profile {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  overflow: hidden;
}

.sidebar__item--round {
  border-radius: 999px;
}

.sidebar__item > img,
.sidebar__profile > img {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar__item > .sidebar__icon--small {
  width: 14px;
  height: 14px;
}

.page {
  position: relative;
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
}

.screen-content {
  width: var(--content-width);
  margin: 0 auto;
  padding: 42px 0 94px;
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.progress {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
}

.progress__label {
  color: var(--text-secondary);
  font-size: 8px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.08px;
}

.progress__track {
  display: flex;
  width: 100%;
  height: 2px;
  gap: 4px;
}

.progress__segment {
  position: relative;
  flex: 1 1 0;
  height: 2px;
  overflow: hidden;
  border-radius: 9999px;
  background: var(--blue-rest);
}

.progress__value {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--blue);
}

.heading-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heading-block__titles {
  display: flex;
  flex-direction: column;
}

.brand-name,
.heading-block h1,
.heading-block__description,
.file-section h2,
.review-section h2 {
  margin: 0;
}

.brand-name {
  position: relative;
  z-index: 1;
  margin-bottom: -3px;
  padding: 0 1px;
  color: #1d1b20;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.25px;
}

.heading-block h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
}

.heading-block__description {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.3;
}

.input-form,
.review-area {
  display: flex;
  margin-top: 56px;
  flex-direction: column;
  gap: 34px;
}

.input-form--uploaded {
  gap: 28px;
}

.campaign-form {
  gap: 36px;
}

.file-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 6px;
}

.file-section--visual {
  gap: 8px;
}

.file-section h2,
.review-section h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1px;
}

.file-section__heading {
  display: flex;
  align-items: center;
  gap: 4px;
}

.question-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.file-section__body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.file-input {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.file-input__control {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 4px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.file-input__control img {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.file-input__placeholder {
  color: var(--placeholder);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.file-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.file-input:focus-within .file-input__control {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.field-caption {
  position: relative;
  display: block;
  width: 100%;
  padding-left: 15px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: -0.1px;
}

.field-caption::before {
  content: "•";
  position: absolute;
  left: 6px;
}

.visual-fields {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 12px;
  list-style-position: inside;
}

.input-form--uploaded .visual-fields {
  gap: 4px;
}

.visual-field {
  display: list-item;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.visual-field__name {
  margin-left: 2px;
}

.visual-field .file-input,
.visual-field .completed-file-wrap,
.visual-field .brand-color-input,
.visual-field > .field-caption {
  margin-top: 4px;
}

.brand-color-input {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.brand-color-input__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.brand-color-input__hex {
  width: 112px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  text-transform: uppercase;
}

.brand-color-input__hex:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(42, 104, 255, 0.14);
}

.brand-color-input__add,
.brand-color-input__eyedropper {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.brand-color-input__add:hover,
.brand-color-input__eyedropper:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.brand-color-input__picker {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.brand-color-input__picker span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: conic-gradient(#e5484d, #f5d90a, #30a46c, #0091ff, #8e4ec6, #e5484d);
}

.brand-color-input__picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.brand-color-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.brand-color-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.brand-color-chip__swatch {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
}

.brand-color-chip__value {
  flex: 1;
  overflow: hidden;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
}

.brand-color-chip button {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
}

.color-empty {
  margin: 0;
  color: var(--placeholder);
  font-size: 11px;
  font-weight: 400;
}

.review-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.review-color-swatch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.review-color-swatch span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 5px;
}

.review-color-swatch small {
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.visual-asset-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.visual-asset-preview__card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.visual-asset-preview__canvas {
  display: grid;
  min-height: 120px;
  padding: 16px;
  place-items: center;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f1f3f5 25%, transparent 25%),
    linear-gradient(-45deg, #f1f3f5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f3f5 75%),
    linear-gradient(-45deg, transparent 75%, #f1f3f5 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.visual-asset-preview__canvas img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: 96px;
  object-fit: contain;
}

.visual-asset-preview__card figcaption {
  padding: 7px 9px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completed-file-wrap {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 4px;
}

.file-row {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 8px 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
}

.file-row--error {
  border-color: var(--red);
  background: #fff;
}

.file-row__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.file-row__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.file-row__body strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row__body small {
  color: var(--text-secondary);
  font-size: 8px;
  letter-spacing: -0.08px;
}

.icon-button,
.file-row__action {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.icon-button img,
.file-row__action {
  display: block;
  width: 16px;
  height: 16px;
}

.file-row__spinner,
.loading-row--loading img {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.validation {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.1px;
}

.validation img {
  width: 10px;
  height: 10px;
}

.validation--blue { color: var(--blue); }
.validation--red { color: var(--red); }

.add-file-button {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  color: var(--placeholder);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.1px;
}

.add-file-button img {
  width: 10px;
  height: 10px;
}

.loading-screen {
  display: grid;
  min-height: max(810px, 100vh);
  place-items: center;
}

.loading-card {
  display: flex;
  width: 300px;
  flex-direction: column;
  gap: 36px;
  transform: translateY(-26px);
}

.loading-card__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.loading-card__header h1,
.loading-card__header p {
  margin: 0;
}

.loading-card__header h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.loading-card__header p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

.loading-card__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.loading-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.loading-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

.loading-row img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.loading-row--loading { color: var(--text); }
.loading-row--waiting { color: var(--border); }

.loading-progress {
  height: 2px;
  overflow: hidden;
  background: #e5e8eb;
}

.loading-progress span {
  display: block;
  width: 36%;
  height: 100%;
  background: var(--blue);
}

.screen-content--review {
  padding-bottom: 110px;
}

.review-area {
  gap: 48px;
}

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

.review-section__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-files,
.inline-chips {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 4px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--placeholder);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: -0.1px;
}

.file-chip > span {
  display: flex;
  align-items: center;
  gap: 2px;
}

.file-chip > span img {
  width: 12px;
  height: 12px;
}

.file-chip button,
.file-chip button img {
  display: block;
  width: 10px;
  height: 10px;
}

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

.review-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-item__header {
  display: flex;
  min-height: 18px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.review-item__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-button {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  color: var(--placeholder);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.1px;
}

.refresh-button img {
  width: 10px;
  height: 10px;
}

.remove-item-button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.remove-item-button img {
  width: 12px;
  height: 12px;
}

.textarea-wrap {
  position: relative;
}

.review-textarea {
  display: block;
  width: 100%;
  min-height: 78px;
  padding: 8px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

.review-textarea--focused,
.review-textarea:focus {
  border-color: var(--text);
  color: var(--text);
}

.textarea-grip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 5px;
  height: 5px;
  pointer-events: none;
}

.numbered-color {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.page-navigation[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.api-feedback {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.api-feedback--error {
  border-color: #e8a3a3;
  background: #fff4f4;
  color: #a32929;
}

.api-feedback--success {
  border-color: #9acdab;
  background: #f1fbf4;
  color: #246b3b;
}

.page-direction {
  position: fixed;
  z-index: 10;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  line-height: 1.3;
}

.page-direction--previous {
  left: 62px;
  color: var(--border);
}
.page-direction--next { right: 20px; }

.page-direction img {
  width: 16px;
  height: 16px;
}

.page-direction:disabled {
  color: var(--border);
  cursor: default;
}

@media (max-height: 809px) {
  .sidebar {
    position: absolute;
    height: 810px;
  }

  .page-direction {
    position: absolute;
  }
}
