:root {
  --paper: #f8f9f6;
  --paper-soft: #e8eeea;
  --ink: #171515;
  --ink-soft: #4d4640;
  --quiet: #6f7772;
  --line: rgba(23, 21, 21, 0.13);
  --wine: #7b1e2f;
  --wine-deep: #42121c;
  --sage: #89977c;
  --rose: #b56a78;
  --white: #ffffff;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 21, 21, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(137, 151, 124, 0.2), transparent 28%),
    radial-gradient(circle at 86% 42%, rgba(181, 106, 120, 0.2), transparent 30%),
    linear-gradient(180deg, var(--paper) 0%, #f3f5f1 58%, var(--paper-soft) 100%);
  background-size: 64px 64px, auto, auto, auto;
  font-family: "Avenir Next", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
}

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

button,
input {
  font: inherit;
}

.studio-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  width: min(var(--max), calc(100% - 32px));
  min-height: 58px;
  margin: 16px auto 0;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(248, 249, 246, 0.78);
  box-shadow: 0 22px 70px rgba(61, 46, 38, 0.12);
  backdrop-filter: blur(18px);
}

.brand,
.studio-header nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 800;
}

.studio-header nav {
  color: var(--ink-soft);
  font-size: 14px;
}

.mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
}

.mark::before {
  content: "";
  width: 20px;
  height: 20px;
  background: var(--paper);
  clip-path: polygon(12% 58%, 40% 18%, 88% 24%, 72% 68%, 26% 82%);
}

.studio {
  width: min(var(--max), calc(100% - 32px));
  margin: 54px auto 80px;
}

.hero-panel {
  max-width: 820px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--wine);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(50px, 8vw, 104px);
  line-height: 0.92;
}

.hero-panel p:last-child {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.55;
}

.status-panel {
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.status-panel div,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  background: rgba(248, 249, 246, 0.78);
  box-shadow: 0 18px 52px rgba(61, 46, 38, 0.12);
  backdrop-filter: blur(18px);
}

.status-panel div {
  min-width: 0;
  padding: 14px 16px;
}

.status-panel span {
  display: block;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-panel strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.panel {
  padding: 20px;
}

.panel-heading {
  margin-bottom: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.panel-heading > span {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--wine);
  font-size: 13px;
  font-weight: 900;
}

.panel h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.panel p {
  margin: 6px 0 0;
  color: var(--quiet);
  line-height: 1.45;
}

label {
  margin-top: 12px;
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(23, 21, 21, 0.14);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.54);
  outline: none;
}

input:focus {
  border-color: rgba(123, 30, 47, 0.46);
  box-shadow: 0 0 0 4px rgba(123, 30, 47, 0.08);
}

button {
  min-height: 48px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: var(--wine);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.levels-panel,
.publish-panel {
  margin-top: 16px;
}

.level-form {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.levels-list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.level-item {
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
}

.level-item span {
  color: var(--quiet);
  font-size: 13px;
}

.share-box {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.hidden {
  display: none;
}

.message {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  max-width: min(560px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 18px 48px rgba(61, 46, 38, 0.22);
  transform: translateX(-50%);
}

.message.error {
  background: var(--wine);
}

@media (max-width: 760px) {
  .studio {
    margin-top: 34px;
  }

  .status-panel,
  .grid,
  .level-form,
  .share-box {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(42px, 15vw, 68px);
  }
}
