:root {
  --ink: #161616;
  --muted: #888888;
  --line: #dedede;
  --soft-line: #ededed;
  --panel: #ffffff;
  --lime: #dfff5a;
  --black: #151515;
  --soft: #f6f6f6;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.launch-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  color: #111111;
  background: var(--lime);
  font-size: 14px;
  font-weight: 700;
}

.launch-bar span {
  justify-self: center;
}

.launch-bar button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.app-nav {
  display: grid;
  grid-template-columns: 129px 1fr auto;
  align-items: center;
  height: 58px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e4e4e4;
}

.brand,
.main-nav,
.nav-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  font-size: 16px;
}

.brand-badge {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #151515;
  background: #ffe266;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 900;
}

.main-nav {
  gap: 20px;
  color: #666666;
  font-size: 14px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 15px;
  border-radius: 6px;
}

.main-nav a.is-active {
  color: #222222;
  background: #f4f4f4;
  font-weight: 800;
}

.nav-actions {
  gap: 18px;
  font-size: 13px;
}

.nav-actions button {
  border: 0;
  background: transparent;
  color: #666666;
  cursor: pointer;
}

.account-dot {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: #0d1117;
  border-radius: 50%;
  font-weight: 800;
}

.main-image-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  min-height: calc(100vh - 100px);
}

.setup-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 100px);
  background: #ffffff;
  border-right: 1px solid #dedede;
}

.upload-block,
.basic-info {
  padding: 18px 20px 0;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.label-row h1 {
  margin: 0;
  font-size: 15px;
}

.label-row span,
.label-row small {
  color: #8a8a8a;
  font-size: 12px;
}

.product-upload {
  display: grid;
  height: 152px;
  place-items: center;
  padding: 22px;
  text-align: center;
  border: 2px dashed #d7d7d7;
  border-radius: 8px;
  cursor: pointer;
}

.product-upload input,
.reference-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.upload-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 11px;
  color: #777777;
  background: #eeeeee;
  border-radius: 8px;
  font-size: 24px;
}

.product-upload strong {
  margin-bottom: 8px;
  font-size: 14px;
}

.product-upload small {
  color: #999999;
  font-size: 12px;
}

.label-row.secondary {
  margin: 12px 0 10px;
}

.reference-upload {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: #b1b1b1;
  border: 2px dashed #dcdcdc;
  border-radius: 6px;
  cursor: pointer;
}

.reference-upload strong {
  margin-top: 10px;
  line-height: 1;
}

.reference-upload small {
  margin-top: -16px;
  font-size: 12px;
}

.basic-info {
  padding-top: 20px;
}

.basic-info h2 {
  margin: 0 0 16px;
  font-size: 15px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.field span {
  color: #606060;
  font-size: 12px;
}

select,
input,
textarea {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: #222222;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 5px;
  outline: none;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #8f8f8f 50%) calc(100% - 17px) 14px / 6px 6px no-repeat,
    linear-gradient(135deg, #8f8f8f 50%, transparent 50%) calc(100% - 12px) 14px / 6px 6px no-repeat,
    #ffffff;
  color: #222222;
}

input::placeholder,
textarea::placeholder {
  color: #a7a7a7;
}

textarea {
  min-height: 50px;
  padding: 10px;
  resize: none;
}

.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.think-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2px;
  background: #f4f4f4;
  border-radius: 8px;
}

.think-tabs button {
  height: 29px;
  color: #777777;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
}

.think-tabs button.is-active {
  color: #111111;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
}

.cost-note {
  margin: 12px 0 8px;
  color: #9a9a9a;
  font-size: 12px;
}

.plan-button {
  width: 100%;
  height: 37px;
  color: #9b9b9b;
  background: #f1f1f1;
  border: 0;
  border-radius: 5px;
  font-weight: 800;
  cursor: pointer;
}

.plan-button.is-ready {
  color: #ffffff;
  background: #222222;
}

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 17px 20px;
  color: #777777;
  border-top: 1px solid #e3e3e3;
  font-size: 12px;
}

.main-workspace {
  position: relative;
  display: grid;
  grid-template-rows: 58px 1fr;
  min-height: calc(100vh - 100px);
  background: #ffffff;
}

@media (min-width: 981px) {
  body {
    display: flex;
    height: 100vh;
    flex-direction: column;
    overflow: hidden;
  }

  .launch-bar,
  .app-nav {
    flex: 0 0 auto;
  }

  .main-image-shell {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .setup-panel,
  .main-workspace {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .upload-block {
    padding: 14px 16px 0;
  }

  .basic-info {
    padding: 14px 16px 0;
  }

  .label-row {
    margin-bottom: 10px;
  }

  .product-upload {
    height: 108px;
    padding: 14px;
  }

  .upload-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 7px;
    font-size: 20px;
  }

  .product-upload strong {
    margin-bottom: 5px;
  }

  .label-row.secondary {
    margin: 10px 0 8px;
  }

  .reference-upload {
    width: 52px;
    height: 52px;
  }

  .reference-upload strong {
    margin-top: 5px;
  }

  .reference-upload small {
    margin-top: -12px;
  }

  .basic-info h2 {
    margin-bottom: 10px;
  }

  .field {
    gap: 5px;
    margin-bottom: 7px;
  }

  select,
  input,
  textarea {
    min-height: 31px;
  }

  select {
    background:
      linear-gradient(45deg, transparent 50%, #8f8f8f 50%) calc(100% - 17px) 13px / 6px 6px no-repeat,
      linear-gradient(135deg, #8f8f8f 50%, transparent 50%) calc(100% - 12px) 13px / 6px 6px no-repeat,
      #ffffff;
  }

  .two-fields {
    margin-bottom: 7px;
  }

  .two-fields .field {
    margin-bottom: 0;
  }

  textarea {
    min-height: 42px;
    padding: 8px 10px;
  }

  .think-tabs button {
    height: 27px;
  }

  .cost-note {
    margin: 8px 0 7px;
  }

  .plan-button {
    height: 34px;
  }

  .panel-foot {
    flex: 0 0 auto;
    padding: 10px 16px;
  }
}

.workspace-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid #ededed;
}

.workspace-topbar h2 {
  margin: 0;
  font-size: 16px;
}

.workspace-topbar span {
  padding: 5px 12px;
  color: #777777;
  background: #f3f3f3;
  border-radius: 999px;
  font-size: 12px;
}

.workspace-body {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  background: #ffffff;
}

.empty-state {
  width: min(420px, 100%);
  text-align: center;
}

.bag-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 24px;
  background: #f1f1f1;
  border-radius: 16px;
}

.bag-icon::before {
  content: "";
  width: 25px;
  height: 22px;
  border: 3px solid #bcbcbc;
  border-radius: 4px;
  background:
    linear-gradient(#bcbcbc, #bcbcbc) 50% 8px / 14px 3px no-repeat;
}

.empty-state h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.empty-state > p {
  margin: 0 0 26px;
  color: #999999;
  font-size: 14px;
}

.guide-card {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  width: 362px;
  margin: 0 auto;
  padding: 18px 18px 15px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
}

.guide-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #2989ff;
  background: #eaf4ff;
  border-radius: 7px;
  font-weight: 900;
}

.guide-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.guide-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  color: #666666;
  font-size: 12px;
  line-height: 1.45;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 220px));
  gap: 16px;
  width: min(960px, calc(100% - 80px));
  margin: 0 auto;
}

.result-grid article {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.result-grid span {
  display: block;
  height: 170px;
  background:
    linear-gradient(#ffffff, #ffffff) 50% 50% / 86px 98px no-repeat,
    linear-gradient(135deg, #ededed, #dadada);
}

.result-grid strong,
.result-grid small {
  display: block;
  padding: 0 14px;
}

.result-grid strong {
  margin-top: 12px;
}

.result-grid small {
  margin: 4px 0 14px;
  color: #777777;
}

.history-fab {
  position: absolute;
  right: 16px;
  bottom: 22px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  background: #111111;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 22px;
}

@media (max-width: 980px) {
  .app-nav {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 58px;
  }

  .main-nav {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 12px;
  }

  .main-image-shell {
    grid-template-columns: 1fr;
  }

  .setup-panel {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #dedede;
  }

  .main-workspace {
    min-height: 650px;
  }
}

@media (max-width: 620px) {
  .launch-bar {
    height: auto;
    min-height: 42px;
    font-size: 12px;
  }

  .two-fields,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .guide-card {
    width: calc(100% - 28px);
  }
}
