@font-face {
  font-family: "Minecrafter Desafio";
  src: url("assets/renderdedsafio/Minecrafter.Reg.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050b13;
  --panel: rgba(8, 24, 36, 0.86);
  --panel-strong: #081925;
  --line: rgba(103, 220, 241, 0.2);
  --line-bright: rgba(103, 229, 248, 0.56);
  --text: #f5fbff;
  --muted: #93aeba;
  --cyan: #63e7fb;
  --purple: #a96bff;
  --pink: #ff3ebd;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(78, 209, 236, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 209, 236, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 4%, rgba(37, 185, 220, 0.16), transparent 28%),
    radial-gradient(circle at 91% 18%, rgba(153, 63, 220, 0.14), transparent 30%),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto;
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #07101c;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.tool-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(22px, calc((100% - 1500px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(4, 14, 22, 0.86);
  backdrop-filter: blur(18px);
}

.tool-brand,
.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.tool-brand {
  gap: 11px;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.tool-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(87, 226, 249, 0.28));
}

.back-link {
  min-height: 42px;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(105, 220, 241, 0.28);
  border-radius: 999px;
  background: rgba(14, 43, 58, 0.52);
  color: #cce5ed;
  font-size: 0.84rem;
  font-weight: 700;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
}

.name-tool {
  width: min(calc(100% - 40px), 1500px);
  margin: 0 auto;
  padding: 74px 0 86px;
}

.tool-intro {
  max-width: 820px;
  margin-bottom: 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.tool-intro h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.tool-intro h1 span {
  background: linear-gradient(90deg, #ff36c7, #31deff 38%, #80ff4f 62%, #ffbf2f 80%, #ff405e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tool-intro > p:last-child {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(330px, 400px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.controls-panel,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.controls-panel {
  overflow: hidden;
}

.control-section {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.control-section:last-child {
  border-bottom: 0;
}

.control-section-main {
  background: radial-gradient(circle at 92% 10%, rgba(80, 222, 247, 0.1), transparent 36%);
}

.section-title {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.section-title > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(100, 225, 247, 0.32);
  border-radius: 10px;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
}

.section-title strong,
.section-title small {
  display: block;
}

.section-title strong {
  font-family: "Manrope", sans-serif;
  font-size: 0.94rem;
}

.section-title small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.control-section > label:not(.range-label),
.color-row label,
.preview-options label {
  color: #b6ccd5;
  font-size: 0.72rem;
  font-weight: 700;
}

input[type="text"],
select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(118, 180, 204, 0.25);
  border-radius: 10px;
  outline: 0;
  background: rgba(3, 13, 21, 0.74);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="text"] {
  font-family: "Minecrafter Desafio", "Inter", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

input[type="text"]:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(88, 222, 246, 0.11);
}

.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  color: #b6ccd5;
  font-size: 0.72rem;
  font-weight: 700;
}

.range-label output {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: #57def6;
  cursor: pointer;
}

.hue-random-button {
  justify-self: start;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(113, 211, 232, 0.3);
  border-radius: 9px;
  background: rgba(10, 34, 47, 0.72);
  color: #d7eaf0;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.hue-random-button:hover,
.hue-random-button:focus-visible {
  border-color: var(--cyan);
  outline: 0;
  box-shadow: 0 0 20px rgba(70, 216, 241, 0.16);
  transform: translateY(-1px);
}

.color-row {
  display: grid;
  gap: 10px;
}

.color-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.color-row label {
  display: grid;
  gap: 6px;
}

input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 3px;
  border: 1px solid rgba(118, 180, 204, 0.25);
  border-radius: 9px;
  background: rgba(3, 13, 21, 0.74);
  cursor: pointer;
}

.preview-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.preview-toolbar,
.preview-options,
.download-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-toolbar {
  justify-content: space-between;
  min-height: 42px;
  padding: 0 4px 14px;
  color: #ddecf2;
  font-size: 0.78rem;
  font-weight: 700;
}

.preview-toolbar > div:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4dff9b;
  box-shadow: 0 0 12px #4dff9b;
}

.preview-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.preview-meta span {
  padding: 6px 9px;
  border: 1px solid rgba(112, 193, 214, 0.18);
  border-radius: 999px;
  color: #86a9b7;
  font-size: 0.64rem;
  font-weight: 600;
}

.canvas-stage {
  position: relative;
  display: grid;
  min-height: clamp(330px, 47vw, 650px);
  place-items: center;
  overflow: hidden;
  padding: clamp(18px, 4vw, 54px);
  border: 1px solid rgba(101, 204, 226, 0.22);
  border-radius: 14px;
  background-color: #10202a;
  transition: background 180ms ease;
}

.canvas-stage::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.25);
  content: "";
  pointer-events: none;
}

.canvas-stage.checkerboard {
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.075) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.075) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.075) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.075) 75%);
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-size: 28px 28px;
}

.canvas-stage.dark {
  background: radial-gradient(circle at center, #263c48, #060d13 74%);
}

.canvas-stage.light {
  background: radial-gradient(circle at center, #fff, #bdc8ce 78%);
}

#nameCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.26));
}

.preview-options {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px);
  justify-content: end;
  margin-top: 14px;
}

.preview-options select {
  min-height: 40px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.download-actions {
  margin-top: 18px;
}

.primary-button,
.secondary-button {
  padding: 0 18px;
}

.primary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid #7eeeff;
  background: linear-gradient(100deg, #47d7ee, #79ecff);
  color: #04202b;
  box-shadow: 0 0 28px rgba(64, 215, 240, 0.2);
}

.primary-button span {
  font-size: 1.15rem;
}

.secondary-button {
  border: 1px solid rgba(113, 211, 232, 0.3);
  background: rgba(10, 34, 47, 0.72);
  color: #d7eaf0;
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--cyan);
  outline: 0;
  box-shadow: 0 0 24px rgba(70, 216, 241, 0.18);
  transform: translateY(-2px);
}

.tool-status {
  min-height: 20px;
  margin: 14px 2px 0;
  color: #77e5f8;
  font-size: 0.72rem;
}

.tool-status.is-error {
  color: #ff8b9c;
}

.usage-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid rgba(110, 199, 220, 0.16);
  border-radius: 12px;
  background: rgba(3, 13, 21, 0.4);
}

.usage-note strong {
  color: var(--cyan);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.usage-note p {
  margin: 0;
  color: #84a0ad;
  font-size: 0.72rem;
  line-height: 1.55;
}

.social-tool {
  margin-top: 72px;
  padding-top: 54px;
  border-top: 1px solid var(--line);
}

.social-tool-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.social-tool-heading span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.social-tool-heading h2 {
  margin: 5px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.05em;
}

.social-tool-heading p {
  max-width: 430px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.social-generator-layout {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.social-controls-panel,
.social-preview-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.social-preview-panel {
  padding: 18px;
}

#socialUsername,
#socialPrefix {
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.social-color-row {
  margin-bottom: 5px;
}

.social-canvas-stage {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
  overflow: hidden;
  padding: clamp(18px, 4vw, 54px);
  border: 1px solid rgba(101, 204, 226, 0.22);
  border-radius: 14px;
  background-color: #10202a;
  transition: background 180ms ease;
}

.social-canvas-stage::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.25);
  content: "";
  pointer-events: none;
}

.social-canvas-stage.checkerboard {
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.075) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.075) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.075) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.075) 75%);
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-size: 28px 28px;
}

.social-canvas-stage.dark {
  background: radial-gradient(circle at center, #263c48, #060d13 74%);
}

.social-canvas-stage.light {
  background: radial-gradient(circle at center, #fff, #bdc8ce 78%);
}

#socialCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 280px;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.28));
}

.resource-tool {
  margin-top: 72px;
  padding-top: 54px;
  border-top: 1px solid var(--line);
}

.resource-tool-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.resource-tool-heading span {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.resource-tool-heading h2 {
  margin: 5px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.05em;
}

.resource-tool-heading p {
  max-width: 430px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.resource-group + .resource-group {
  margin-top: 42px;
}

.resource-group-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.resource-group-heading span {
  color: var(--cyan);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resource-group-heading h3 {
  margin: 3px 0 0;
  color: #f2fbfd;
  font-family: "Manrope", sans-serif;
  font-size: 1.5rem;
}

.resource-group-heading strong {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

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

.resource-card {
  overflow: hidden;
  border: 1px solid rgba(109, 205, 229, 0.22);
  border-radius: 20px;
  background: rgba(5, 22, 32, 0.72);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.resource-preview {
  display: grid;
  height: 270px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #030b12;
}

.resource-preview-button {
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  appearance: none;
  transition: border-color 160ms ease, filter 160ms ease;
}

.resource-preview-button:hover {
  filter: brightness(1.08);
}

.resource-preview-button:focus-visible {
  outline: 3px solid rgba(99, 231, 251, 0.8);
  outline-offset: -3px;
}

.resource-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.resource-preview-background img {
  object-fit: cover;
  object-position: center 36%;
}

.resource-preview-logo img {
  width: min(88%, 520px);
  height: auto;
  max-height: 82%;
}

.resource-card-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px;
}

.resource-card-compact .resource-card-content {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
}

.resource-card-content > div > span {
  color: var(--cyan);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.resource-card h3 {
  margin: 5px 0 4px;
  color: #f2fbfd;
  font-family: "Manrope", sans-serif;
  font-size: 1.15rem;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.resource-download {
  min-height: 46px;
  padding-inline: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.resource-card-compact .resource-download {
  width: 100%;
  min-height: 42px;
}

.resource-download.is-downloading {
  pointer-events: none;
  opacity: 0.72;
}

.resource-download.is-error {
  border-color: rgba(255, 95, 125, 0.7);
  background: rgba(114, 27, 48, 0.9);
  color: #fff;
}

body.resource-preview-open {
  overflow: hidden;
}

.resource-preview-dialog {
  width: min(940px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(99, 231, 251, 0.35);
  border-radius: 22px;
  background: #06131d;
  color: var(--text);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.72);
}

.resource-preview-dialog::backdrop {
  background: rgba(0, 6, 11, 0.86);
  backdrop-filter: blur(10px);
}

.resource-preview-modal {
  display: grid;
  max-height: calc(100dvh - 30px);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  padding: 20px;
}

.resource-preview-modal-heading span {
  color: var(--cyan);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resource-preview-modal-heading h2 {
  margin: 4px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.resource-preview-full {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #020910;
}

.resource-preview-full img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 250px);
  object-fit: contain;
}

.resource-preview-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.resource-preview-modal-actions button {
  width: 100%;
}

.resource-preview-modal-actions .is-downloading {
  pointer-events: none;
  opacity: 0.72;
}

.resource-preview-modal-actions .is-error {
  border-color: rgba(255, 95, 125, 0.7);
  background: rgba(114, 27, 48, 0.9);
  color: #fff;
}

.resource-preview-modal > .tool-status {
  margin: 0;
  text-align: center;
}

.composition-tool {
  margin-top: 72px;
  padding-top: 58px;
  border-top: 1px solid var(--line);
}

.composition-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.creator-lockup {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 7px 20px 7px 9px;
  border: 1px solid rgba(99, 231, 251, 0.25);
  border-radius: 18px;
  background: rgba(5, 20, 30, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.creator-lockup img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.creator-lockup span {
  color: #f7fcff;
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.creator-lockup strong {
  font-weight: 800;
}

.composition-heading-copy {
  max-width: 560px;
  text-align: right;
}

.composition-heading-copy > span {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.composition-heading-copy h2 {
  margin: 4px 0 5px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.05em;
}

.composition-heading-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.composition-preview-panel {
  display: grid;
  justify-items: center;
  padding: 26px;
  border: 1px solid rgba(109, 205, 229, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 30%, rgba(62, 190, 223, 0.09), transparent 46%),
    rgba(5, 22, 32, 0.72);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.composition-frame {
  width: min(100%, 620px);
  overflow: hidden;
  border: 1px solid rgba(99, 231, 251, 0.28);
  border-radius: 18px;
  background: #030b12;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.composition-frame canvas {
  display: block;
  width: 100%;
  height: auto;
}

.composition-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 22px;
}

.composition-actions .primary-button {
  min-width: 240px;
}

.composition-actions .tool-status {
  margin: 0;
  text-align: center;
}

@media (max-width: 1050px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }

  .controls-panel form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-section {
    border-right: 1px solid var(--line);
  }

  .preview-panel {
    position: static;
  }

  .social-generator-layout {
    grid-template-columns: 1fr;
  }

  .social-controls-panel form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .composition-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .composition-heading-copy {
    text-align: left;
  }
}

@media (max-width: 680px) {
  .tool-header {
    min-height: 66px;
    padding-inline: 14px;
  }

  .tool-brand img {
    width: 36px;
    height: 36px;
  }

  .back-link {
    min-height: 38px;
    padding: 0 12px;
  }

  .name-tool {
    width: min(calc(100% - 24px), 1500px);
    padding-top: 50px;
  }

  .tool-intro h1 {
    font-size: clamp(2.65rem, 16vw, 4.4rem);
  }

  .controls-panel form {
    grid-template-columns: 1fr;
  }

  .control-section {
    padding: 20px;
    border-right: 0;
  }

  .preview-panel {
    padding: 11px;
  }

  .preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-meta {
    justify-content: flex-start;
  }

  .canvas-stage {
    min-height: 300px;
    padding: 12px;
  }

  .preview-options {
    grid-template-columns: 1fr;
  }

  .download-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button {
    grid-column: 1 / -1;
  }

  .social-tool {
    margin-top: 48px;
    padding-top: 38px;
  }

  .social-tool-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-controls-panel form {
    grid-template-columns: 1fr;
  }

  .social-canvas-stage {
    min-height: 280px;
    padding: 12px;
  }

  .resource-tool {
    margin-top: 48px;
    padding-top: 38px;
  }

  .resource-tool-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-preview {
    height: 300px;
  }

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

  .resource-card-content {
    grid-template-columns: 1fr;
  }

  .resource-download {
    width: 100%;
  }

  .resource-preview-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .resource-preview-modal {
    max-height: calc(100dvh - 18px);
    padding: 12px;
  }

  .resource-preview-full img {
    max-height: calc(100dvh - 230px);
  }

  .composition-tool {
    margin-top: 48px;
    padding-top: 38px;
  }

  .composition-preview-panel {
    padding: 12px;
  }

  .creator-lockup {
    width: 100%;
  }

  .composition-actions,
  .composition-actions .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
