:root {
  color-scheme: dark;
  --ink: #f7f4ff;
  --muted: #aaa4ba;
  --panel: rgba(30, 25, 42, .78);
  --line: rgba(255, 255, 255, .12);
  --purple: #9b7cff;
  --pink: #ff6fae;
  --mint: #6fe7c8;
  --canvas: #100d17;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(155, 124, 255, .24), transparent 30rem),
    radial-gradient(circle at 90% 25%, rgba(255, 111, 174, .16), transparent 28rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.site-header, footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header { min-height: 84px; }
.site-header nav { display: flex; gap: 28px; color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 12px 36px rgba(155, 124, 255, .25);
}

.hero, .section, .publication {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  align-items: center;
  gap: clamp(34px, 5vw, 72px);
  padding: 70px 0 100px;
}
.eyebrow {
  margin: 0 0 16px;
  color: var(--mint);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; max-width: 760px; font-size: clamp(3.2rem, 7.8vw, 6.8rem); line-height: .92; letter-spacing: -.075em; }
h1 span { color: transparent; background: linear-gradient(100deg, var(--purple), var(--pink)); background-clip: text; }
h2 { max-width: 780px; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -.055em; }
h3 { font-size: 1.55rem; }
.lede { max-width: 620px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.55; }
.promise-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.promise-row span, .format-list span, .publication-state {
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px;
  color: #d7d1e4; background: rgba(255,255,255,.035); font-size: .85rem;
}

.upload-card, .editor-card, .mode-grid article, .safety {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  backdrop-filter: blur(24px);
  box-shadow: 0 28px 90px rgba(0,0,0,.3);
}
.upload-card { padding: 18px; }
.upload-experience {
  min-width: 0;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.upload-monster {
  --look-x: 0px;
  --look-y: 0px;
  position: relative;
  z-index: 2;
  width: 156px;
  height: 218px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 70% 100%;
  filter: drop-shadow(0 28px 26px rgba(0,0,0,.32));
}
.monster-body {
  position: relative;
  width: 144px;
  height: 172px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 48% 52% 43% 46% / 44% 44% 56% 56%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.24), transparent 28%),
    linear-gradient(150deg, #a98cff 4%, #8a60f4 48%, #e85ba4 115%);
  box-shadow:
    inset -12px -16px 30px rgba(55,20,94,.25),
    inset 8px 8px 22px rgba(255,255,255,.12);
  animation: monster-float 4.2s ease-in-out infinite;
}
.monster-horn {
  position: absolute;
  z-index: -1;
  top: 29px;
  width: 31px;
  height: 51px;
  border-radius: 80% 10% 70% 30%;
  background: linear-gradient(160deg, #f4d6ff, #a77dff 75%);
  box-shadow: inset -5px -5px 8px rgba(79,35,125,.2);
}
.monster-horn-left { left: 20px; transform: rotate(-28deg); }
.monster-horn-right { right: 16px; transform: scaleX(-1) rotate(-28deg); }
.monster-eye {
  position: absolute;
  top: 27px;
  left: 50%;
  width: 105px;
  height: 101px;
  overflow: hidden;
  border: 5px solid rgba(40,24,61,.8);
  border-radius: 50%;
  background: #fffafd;
  box-shadow:
    0 7px 0 rgba(52,27,78,.14),
    inset 0 -9px 18px rgba(155,124,255,.11);
  transform: translateX(-50%);
  transition: width .2s ease, height .2s ease, top .2s ease;
}
.monster-eye::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -4px;
  border-radius: 50%;
  background: #8d68ef;
  transform: scaleY(0);
  transform-origin: top;
}
.monster-iris {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 34%, #bafff0 0 8%, transparent 9%),
    radial-gradient(circle, #62e7cc, #2ea7a1 68%, #14706f);
  box-shadow: 0 0 0 4px rgba(23,80,86,.16);
  transform: translate(calc(-50% + var(--look-x)), calc(-50% + var(--look-y)));
  transition: transform .08s linear;
}
.monster-pupil {
  width: 27px;
  height: 31px;
  display: grid;
  place-items: start end;
  border-radius: 50%;
  background: #15121c;
  transition: transform .2s ease, width .2s ease, height .2s ease;
}
.monster-pupil span {
  width: 8px;
  height: 8px;
  margin: 4px;
  border-radius: 50%;
  background: white;
}
.monster-cheek {
  position: absolute;
  top: 128px;
  width: 22px;
  height: 11px;
  border-radius: 50%;
  opacity: .45;
  background: #ff9ec9;
}
.monster-cheek-left { left: 20px; }
.monster-cheek-right { right: 20px; }
.monster-mouth {
  position: absolute;
  left: 50%;
  top: 135px;
  width: 29px;
  height: 10px;
  border-bottom: 4px solid #40234f;
  border-radius: 0 0 50% 50%;
  transform: translateX(-50%);
  transition: width .2s ease, height .2s ease, border .2s ease, background .2s ease;
}
.monster-shadow {
  position: absolute;
  z-index: -2;
  bottom: -7px;
  width: 115px;
  height: 19px;
  border-radius: 50%;
  background: rgba(0,0,0,.32);
  filter: blur(5px);
  animation: monster-shadow 4.2s ease-in-out infinite;
}
.upload-monster.surprised,
.upload-monster.has-file { animation: monster-pop .45s cubic-bezier(.2, .9, .3, 1.35); }
.upload-monster.surprised .monster-eye,
.upload-monster.has-file .monster-eye { top: 19px; width: 116px; height: 117px; }
.upload-monster.surprised .monster-pupil,
.upload-monster.has-file .monster-pupil { width: 20px; height: 24px; }
.upload-monster.uploading .monster-eye::after {
  animation: monster-blink 1.15s ease-in-out infinite;
}
.upload-monster.uploading .monster-body { animation-duration: 1.3s; }
.upload-monster.success .monster-body { animation: monster-celebrate .65s ease both; }
.upload-monster.success .monster-eye::after { animation: monster-wink .9s .15s ease both; }
.upload-monster.success .monster-mouth {
  top: 130px;
  width: 44px;
  height: 23px;
  border: 4px solid #40234f;
  border-top: 0;
  background: rgba(255,183,213,.75);
}
.upload-monster.error .monster-mouth {
  top: 141px;
  height: 15px;
  border-top: 4px solid #40234f;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}
@keyframes monster-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}
@keyframes monster-shadow {
  0%, 100% { transform: scaleX(1); opacity: .8; }
  50% { transform: scaleX(.82); opacity: .5; }
}
@keyframes monster-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.09) rotate(-3deg); }
  100% { transform: scale(1); }
}
@keyframes monster-blink {
  0%, 38%, 52%, 100% { transform: scaleY(0); }
  44%, 47% { transform: scaleY(1); }
}
@keyframes monster-wink {
  0%, 18%, 62%, 100% { transform: scaleY(0); }
  30%, 50% { transform: scaleY(1); }
}
@keyframes monster-celebrate {
  0% { transform: translateY(0) rotate(0); }
  42% { transform: translateY(-24px) rotate(-7deg); }
  72% { transform: translateY(2px) rotate(4deg); }
  100% { transform: translateY(0) rotate(0); }
}
.drop-zone {
  min-height: 330px; padding: 42px 26px;
  border: 1px dashed rgba(255,255,255,.26); border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; cursor: pointer; transition: .2s ease;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--purple); background: rgba(155,124,255,.08); transform: translateY(-2px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { font-size: 3rem; color: var(--purple); }
.choose-button { margin-top: 18px; padding: 11px 18px; border-radius: 12px; color: #15101e; background: var(--ink); font-weight: 800; }
.selected-file { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(111,231,200,.08); color: var(--mint); }
.upload-progress {
  height: 7px; margin-top: 14px; overflow: hidden; border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.upload-progress span {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--pink)); transition: width .18s ease;
}
.primary-button, .quiet-button {
  border: 0; border-radius: 14px; padding: 13px 18px; cursor: pointer; font-weight: 800;
}
.primary-button { display: inline-flex; align-items: center; justify-content: center; color: #130f1c; background: linear-gradient(100deg, var(--purple), var(--pink)); }
.upload-card > .primary-button { width: 100%; margin-top: 14px; }
.primary-button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .45; }
.quiet-button { color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.05); }
.status { margin: 12px 4px 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }

.section { padding: 110px 0; border-top: 1px solid var(--line); }
.mode-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.mode-grid article { min-height: 260px; padding: 34px; }
.mode-grid p { color: var(--muted); line-height: 1.6; }
.number { display: inline-block; margin-bottom: 64px; color: var(--muted); font-variant-numeric: tabular-nums; }
.accent-card { background: linear-gradient(145deg, rgba(155,124,255,.25), rgba(255,111,174,.12)); }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.format-list { display: flex; align-content: center; align-items: center; flex-wrap: wrap; gap: 12px; }
.safety { margin-bottom: 100px; padding: 38px; display: grid; grid-template-columns: auto 1fr; gap: 28px; }
.safety h2 { font-size: clamp(1.8rem, 4vw, 3.2rem); }
.safety p:last-child { max-width: 800px; color: var(--muted); line-height: 1.6; }
.safety-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: #0c2a22; background: var(--mint); font-size: 1.5rem; font-weight: 900; }
footer { min-height: 100px; border-top: 1px solid var(--line); color: var(--muted); }

.publication { padding: 70px 0 110px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
.publication-hero { grid-column: 1 / -1; padding: 40px 0 18px; }
.publication-cover {
  width: 100%; max-height: 520px; margin-bottom: 34px;
  border: 1px solid var(--line); border-radius: 28px; object-fit: cover;
  box-shadow: 0 28px 80px rgba(0,0,0,.24);
}
.publication h1 { font-size: clamp(2.7rem, 6vw, 5.8rem); }
.publication-actions { display: flex; gap: 12px; margin-top: 28px; }
.author { color: var(--mint); font-weight: 700; }
.viewer { min-height: 610px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(0,0,0,.28); }
.viewer iframe, .viewer video, .viewer img { width: 100%; height: 100%; min-height: 610px; border: 0; object-fit: contain; }
.viewer audio { width: calc(100% - 60px); margin: 260px 30px; }
.publication-blocks {
  grid-column: 1;
  display: grid;
  gap: 22px;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
}
.publication-blocks h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); }
.publication-blocks p { margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.75; white-space: pre-wrap; }
.publication-blocks hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.publication-blocks .primary-button { justify-self: start; }
.contact-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.05);
  font-weight: 800;
}
.contact-button::before { content: "✦"; color: var(--mint); }
.publication-media { width: 100%; margin: 0; }
.publication-media img,
.publication-media video {
  display: block;
  width: 100%;
  max-height: 760px;
  border-radius: 20px;
  object-fit: contain;
  background: rgba(0,0,0,.25);
}
.publication-media audio { width: 100%; }
.publication-media figcaption {
  padding: 10px 4px 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}
.publication-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.publication-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(0,0,0,.2);
}
.related-publication {
  display: grid; gap: 6px; padding: 20px; border: 1px solid var(--line);
  border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.04);
}
.related-publication span { color: var(--muted); line-height: 1.5; }
.publication-contact-form {
  display: grid; gap: 14px; padding: clamp(20px, 5vw, 38px);
  border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.035);
}
.publication-contact-form label { display: grid; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.publication-contact-form input, .publication-contact-form textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line);
  border-radius: 11px; color: var(--ink); background: rgba(0,0,0,.22);
}
.form-status { min-height: 1.4em; font-size: .8rem !important; }
.qr-dialog {
  width: min(420px, calc(100% - 28px)); padding: 30px; border: 1px solid var(--line);
  border-radius: 26px; color: var(--ink); background: #18131f;
  box-shadow: 0 35px 120px rgba(0,0,0,.55);
}
.qr-dialog::backdrop { background: rgba(8,5,12,.72); backdrop-filter: blur(8px); }
.dialog-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--ink);
  background: rgba(255,255,255,.06); cursor: pointer;
}
.qr-code {
  width: 272px; min-height: 272px; display: grid; place-items: center;
  margin: 20px auto; padding: 16px; border-radius: 18px;
  color: #15111d; background: #fff; overflow-wrap: anywhere;
}
.qr-code img, .qr-code canvas { width: 240px !important; height: 240px !important; }
.qr-dialog .primary-button { width: 100%; }
.document-placeholder { min-height: 610px; display: grid; place-items: center; padding: 40px; text-align: center; color: var(--muted); }
.editor-card { grid-column: 2; grid-row: 2 / span 2; align-self: start; position: sticky; top: 20px; padding: 24px; }
.studio-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
  margin: 12px 0 18px; padding: 4px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(0,0,0,.2);
}
.studio-tab {
  min-width: 0; padding: 8px 5px; border: 0; border-radius: 8px;
  color: var(--muted); background: transparent; font-size: .72rem;
  font-weight: 800; cursor: pointer;
}
.studio-tab.is-active { color: #11241f; background: var(--mint); }
.studio-panel { display: none; }
.studio-panel.is-active { display: block; }
.editor-card label { display: grid; gap: 7px; margin: 0 0 14px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.editor-card input, .editor-card textarea, .editor-card select {
  width: 100%; border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 12px; color: var(--ink); background: rgba(0,0,0,.24);
}
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.check-row input { width: auto; }
.editor-card .primary-button { width: 100%; }
.version-control { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.cover-controls, .seo-controls, .lifecycle-controls, .publish-checklist, .revision-controls {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
}
.publication-insights { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.insights-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.insights-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.insights-actions select { width: auto; min-width: 96px; }
.insights-actions .quiet-button { min-height: 38px; padding: 8px 12px; }
.lifecycle-controls p { color: var(--muted); margin: .35rem 0 .8rem; }
.lifecycle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lifecycle-controls > span { display: block; margin-top: 10px; color: var(--muted); }
.lifecycle-controls > span.is-error { color: #d14343; }
.insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
.insights-grid > span {
  min-width: 0; display: grid; gap: 2px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .68rem;
}
.insights-grid strong { color: var(--ink); font-size: 1rem; }
.insights-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-checklist ul { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.publish-checklist li { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.publish-checklist li.is-complete { color: var(--mint); }
.revision-controls > p { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.revision-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.revision-list { display: grid; gap: 7px; margin-top: 10px; }
.revision-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px;
}
.revision-item span { overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.revision-item .quiet-button { padding: 6px 8px; font-size: .66rem; }
.block-builder { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.block-builder > p { margin: 6px 0 14px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.block-add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.block-add-row select,
.block-template-row select {
  min-width: 0; border: 1px solid var(--line); border-radius: 11px;
  padding: 10px; color: var(--ink); background: rgba(0,0,0,.24);
}
.block-history-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px;
  margin-bottom: 9px;
}
.block-history-row .quiet-button { padding: 8px 10px; }
.block-template-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 9px;
}
.block-list { display: grid; gap: 9px; margin: 12px 0; }
.block-row {
  display: grid; grid-template-columns: 1fr auto; gap: 7px;
  padding: 10px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.025);
  transition: border-color .16s ease, opacity .16s ease, transform .16s ease;
}
.block-row.is-dragging { opacity: .42; transform: scale(.98); }
.block-row.is-drop-target { border-color: var(--mint); }
.block-type {
  color: var(--mint);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
}
.block-row input, .block-row textarea { grid-column: 1 / -1; }
.block-media-picker {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 9px 11px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--ink) !important;
  background: rgba(111,231,200,.055);
  cursor: pointer;
}
.block-media-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.block-row-actions { grid-column: 2; grid-row: 1; display: flex; gap: 4px; }
.block-icon-button {
  width: 27px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); background: rgba(255,255,255,.04); cursor: pointer;
}
.block-builder > .quiet-button { width: 100%; }
.media-library { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.media-library-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.media-library > p { margin: 6px 0 12px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.media-library-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.media-library-item {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255,255,255,.035);
  cursor: pointer;
}
.media-library-item > img,
.media-library-item > span {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  object-fit: cover;
  font-size: 1.3rem;
}
.media-library-item small {
  display: block;
  padding: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .6rem;
}
.media-library-empty { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.preview-exit {
  position: fixed;
  z-index: 1000;
  top: 18px;
  right: 18px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  color: #130f1c;
  background: var(--mint);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
body.is-page-preview .site-header,
body.is-page-preview .editor-card { display: none; }
body.is-page-preview .publication { grid-template-columns: minmax(0, 1fr); }
body.is-page-preview .publication-hero,
body.is-page-preview .viewer,
body.is-page-preview .publication-blocks { grid-column: 1; }
.version-control > p { margin: 6px 0 14px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.replace-picker {
  padding: 12px; border: 1px dashed var(--line); border-radius: 11px; cursor: pointer;
}
.replace-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.version-control > .quiet-button { width: 100%; margin-top: 10px; }
.version-control > .quiet-button:disabled { opacity: .45; cursor: not-allowed; }

.library { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 120px; }
.library-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.library-hero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.library-card {
  min-height: 220px; display: flex; flex-direction: column; padding: 24px;
  border: 1px solid var(--line); border-radius: 24px; background: var(--panel);
}
.library-card .kind { color: var(--mint); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.library-card h2 { margin: 18px 0 10px; font-size: 1.5rem; overflow-wrap: anywhere; }
.library-card p { color: var(--muted); font-size: .86rem; }
.library-card .card-actions { display: flex; gap: 9px; margin-top: auto; }
.empty-library {
  grid-column: 1 / -1; padding: 70px 24px; text-align: center;
  border: 1px dashed var(--line); border-radius: 24px; color: var(--muted);
}
.empty-library .primary-button { margin-top: 14px; }

.auth-shell {
  width: min(620px, calc(100% - 40px));
  min-height: calc(100vh - 184px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 60px 0 100px;
}
.auth-card {
  width: 100%;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0,0,0,.3);
}
.auth-card h1 { font-size: clamp(2.5rem, 8vw, 4.7rem); }
.auth-card form { display: grid; gap: 16px; margin-top: 32px; }
.auth-card label { display: grid; gap: 8px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.auth-card label span { font-weight: 500; }
.auth-card input {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(0,0,0,.24);
}
.auth-card input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(155,124,255,.14); }
.auth-card .primary-button { width: 100%; margin-top: 6px; }
.auth-links { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: .84rem; }
.auth-links a:hover { color: var(--ink); }

body.theme-minimal { --panel: rgba(22,22,24,.92); --purple: #f1f1f1; --pink: #a8a8a8; }
body.theme-gallery { --panel: rgba(25,18,34,.88); --purple: #ff9bd0; --pink: #ffc06f; }
body.theme-business { --panel: rgba(14,29,42,.9); --purple: #5fb8ff; --pink: #73ead2; }
body.theme-magazine { --panel: rgba(36,27,22,.92); --purple: #f0d2a6; --pink: #e98f6f; font-family: Georgia, "Times New Roman", serif; }
body.theme-magazine .publication-blocks { border-radius: 2px; }
body.theme-magazine .publication-blocks p { color: #e3d7ca; }
body.theme-portfolio { --panel: rgba(17,22,30,.9); --purple: #8ec5ff; --pink: #e0a7ff; }
body.theme-portfolio .publication-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.theme-music { --panel: rgba(30,13,33,.9); --purple: #ff74d4; --pink: #8b6bff; }
body.theme-music .publication-media-audio { padding: 28px; border-radius: 20px; background: linear-gradient(135deg, rgba(255,116,212,.16), rgba(139,107,255,.12)); }
body.theme-documentation { --panel: rgba(12,27,25,.94); --purple: #86ead4; --pink: #8cb9ff; }
body.theme-documentation .publication-blocks { border-radius: 12px; }

@media (max-width: 820px) {
  .site-header nav { display: none; }
  .hero, .split-section, .publication { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 45px; }
  .upload-experience { width: min(680px, 100%); margin-inline: auto; }
  .mode-grid { grid-template-columns: 1fr; }
  .publication-hero { grid-column: auto; }
  .editor-card { grid-column: auto; grid-row: auto; position: static; }
  body.theme-portfolio .publication-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .site-header, footer, .hero, .section, .publication { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 72px; }
  .brand > span:last-child { font-size: .92rem; }
  h1 { font-size: 3.15rem; }
  .hero { gap: 42px; padding-bottom: 70px; }
  .upload-experience {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .upload-monster {
    width: 122px;
    height: 157px;
    margin: 0 auto -12px;
    transform: scale(.82);
  }
  .upload-card { position: relative; z-index: 3; }
  .drop-zone { min-height: 260px; }
  .section { padding: 75px 0; }
  .safety { grid-template-columns: 1fr; padding: 26px; }
  .control-grid { grid-template-columns: 1fr; }
  .publication { padding-top: 28px; }
  .publication-hero { padding-top: 18px; }
  .publication-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-actions > * { justify-content: center; text-align: center; }
  .editor-card { padding: 16px; border-radius: 20px; }
  .studio-tabs {
    position: sticky; z-index: 20; top: 6px;
    background: rgba(20,15,28,.96); backdrop-filter: blur(16px);
  }
  .block-template-row,
  .block-add-row { grid-template-columns: 1fr; }
  .block-template-row .quiet-button,
  .block-add-row .quiet-button { width: 100%; }
  .block-row-actions { gap: 6px; }
  .block-icon-button { width: 32px; height: 32px; }
  .media-library-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .publication-gallery,
  body.theme-portfolio .publication-gallery { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .library { width: min(100% - 24px, 1180px); }
  .library-hero { align-items: flex-start; flex-direction: column; }
  .library-grid { grid-template-columns: 1fr; }
}
.page-template-picker,
.launch-action {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--panel) 90%, var(--purple) 10%);
}
.page-template-picker > p,
.launch-action > p { margin: .35rem 0 .85rem; color: var(--muted); }
.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}
.template-gallery button {
  display: grid; gap: .2rem; padding: .75rem; text-align: left; color: inherit;
  border: 1px solid var(--line); border-radius: .8rem; background: var(--panel); cursor: pointer;
}
.template-gallery button:hover,
.template-gallery button:focus-visible { border-color: var(--purple); transform: translateY(-1px); }
.template-gallery span { color: var(--muted); font-size: .78rem; }
.launch-action > div { display: flex; justify-content: space-between; gap: 1rem; }
#readiness-score { color: var(--purple); font-weight: 800; }
@media (max-width: 680px) {
  .lifecycle-grid { grid-template-columns: 1fr; }
  .insights-heading { align-items: flex-start; flex-direction: column; }
}
.insights-chart {
  height: 8.5rem; display: flex; align-items: end; gap: .22rem;
  padding: .8rem .25rem .2rem; border-bottom: 1px solid var(--line);
}
.insights-chart > span {
  height: var(--value); min-height: .25rem; flex: 1; border-radius: .3rem .3rem 0 0;
  background: linear-gradient(180deg, var(--purple), color-mix(in srgb, var(--purple) 55%, transparent));
}
.insights-breakdowns {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem; margin-top: .8rem;
}
.insights-breakdowns section { padding: .75rem; border: 1px solid var(--line); border-radius: .8rem; }
.insights-breakdowns ol { list-style: none; padding: 0; margin: .55rem 0 0; }
.insights-breakdowns li {
  display: flex; justify-content: space-between; gap: .5rem; padding: .32rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.insights-breakdowns li span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.revision-empty { color: var(--muted); }
@media (max-width: 760px) {
  .template-gallery, .insights-breakdowns { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .monster-body, .monster-shadow,
  .upload-monster, .upload-monster .monster-eye::after {
    animation: none !important;
  }
  .monster-iris { transition: none; }
}
