:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: #d9e0e7;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --field: #fbfcfd;
  --shadow: 0 14px 40px rgba(28, 39, 49, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

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

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

.workspace {
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.12;
  font-weight: 720;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 16px;
}

p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
}

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

.controls,
.preview,
.output {
  padding: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 9px 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

input[type="file"] {
  padding: 8px;
  background: #fff;
}

input[type="range"] {
  padding: 0;
  min-height: 30px;
  accent-color: var(--accent);
}

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

.slider-row {
  display: grid;
  grid-template-columns: 92px minmax(120px, 1fr) 74px;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

output {
  color: var(--muted);
  text-align: right;
  font-weight: 650;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

button:hover {
  border-color: #b7c3ce;
  background: #f9fbfc;
}

.actions button:first-child,
#copyAllBtn,
#copyCodeBtn {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.actions button:first-child:hover,
#copyAllBtn:hover,
#copyCodeBtn:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.share-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.share-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  background: #e7edf2;
}

.share-copy {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.share-copy strong {
  font-size: 17px;
  line-height: 1.25;
}

.share-copy span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.share-copy small {
  color: #8793a0;
  font-size: 12px;
}

.urls {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.urls div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid #edf1f5;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.output {
  margin-top: 18px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab.active {
  color: #fff;
  background: #26323d;
  border-color: #26323d;
}

textarea {
  min-height: 260px;
  resize: vertical;
  padding: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .app {
    padding: 18px;
  }

  .topbar,
  .grid {
    display: block;
  }

  .topbar button {
    margin-top: 14px;
  }

  .preview {
    margin-top: 18px;
  }

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

  .slider-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  output {
    text-align: left;
  }
}
