@import url("https://fonts.googleapis.com/css2?family=League+Spartan:wght@700;800;900&display=swap");

:root {
  --paper: #f6f3ed;
  --ink: #3d1700;
  --muted: #7b6759;
  --line: #ddd3c7;
  --gold: #d6a236;
  --mint: #b7c9b2;
  --clay: #9a553a;
  --surface: #fffdf8;
  --shadow: 0 18px 60px rgba(53, 22, 4, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "League Spartan", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
  padding: 0 clamp(22px, 5vw, 96px);
  border-bottom: 1px solid #edf0f5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.nav-logo {
  display: grid;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
  line-height: 0.78;
  transition:
    color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.nav-logo span {
  font-size: 2rem;
  font-weight: 900;
}

.nav-logo small {
  margin-top: 8px;
  color: rgba(61, 23, 0, 0.68);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.38em;
  text-align: center;
}

.nav-logo span::after {
  content: "✦";
  margin-left: 4px;
  color: var(--gold);
  font-size: 1rem;
  vertical-align: top;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.nav-links button {
  position: relative;
  border: 0;
  background: transparent;
  color: #9ba8bc;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    transform 160ms ease,
    opacity 160ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.16em;
  bottom: -12px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-logo:hover,
.nav-links a:hover,
.nav-links button:hover,
.nav-logo.is-active {
  color: var(--ink);
  opacity: 1;
}

.nav-links a:hover,
.nav-links button:hover {
  transform: translateY(-1px);
}

.nav-links a.is-active {
  color: var(--ink);
  font-weight: 900;
}

.nav-links a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-logo:active,
.nav-links a:active,
.nav-links button:active,
.home-cta:active,
.login-button:active,
.language-pill:active {
  transform: translateY(1px) scale(0.99);
}

.language-menu {
  position: relative;
}

.language-pill,
.login-button {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.language-pill {
  padding: 0 22px;
  border: 1px solid #e7ebf2;
  background: white;
  color: var(--ink);
}

.language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}

.language-options[hidden] {
  display: none;
}

.language-options button {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.language-options button:hover {
  background: #f6f3ed;
}

.account-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px 6px 16px;
  border: 1px solid #e7ebf2;
  border-radius: 12px;
  background: white;
}

.account-bar[hidden] {
  display: none;
}

.account-bar span {
  max-width: 210px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-bar button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.login-button {
  display: inline-grid;
  place-items: center;
  min-width: 128px;
  padding: 0 26px;
  border: 0;
  background: var(--ink);
  color: white;
  box-shadow: 0 14px 28px rgba(61, 23, 0, 0.18);
  text-decoration: none;
}

.home-section {
  min-height: calc(100vh - 78px);
  scroll-margin-top: 78px;
  display: grid;
  place-items: center;
  padding: clamp(56px, 8vw, 110px) 24px clamp(72px, 10vw, 140px);
  background: #fffdf8;
}

body.view-home .generator-section,
body.view-generator .home-section {
  display: none;
}

body:has(#generator:target) .generator-section {
  display: block;
}

body:has(#generator:target) .home-section {
  display: none;
}

body:has(#home:target) .home-section {
  display: grid;
}

body:has(#home:target) .generator-section {
  display: none;
}

body:has(#generator:target) .nav-links a[href="#generator"] {
  color: var(--ink);
  font-weight: 900;
}

body:has(#generator:target) .nav-links a[href="#generator"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.auth-gate {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: clamp(48px, 7vw, 108px) 24px;
  background:
    radial-gradient(circle at 50% 12%, rgba(214, 162, 54, 0.14), transparent 34%),
    radial-gradient(circle at 18% 42%, rgba(255, 246, 229, 0.9), transparent 30%),
    radial-gradient(circle at 82% 64%, rgba(221, 196, 164, 0.24), transparent 34%),
    #fffdf8;
}

.auth-gate[hidden],
.app-shell[hidden] {
  display: none;
}

.auth-card {
  width: min(100%, 620px);
  padding: clamp(38px, 5.5vw, 68px);
  border: 1px solid rgba(222, 208, 190, 0.82);
  border-radius: 42px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow:
    0 34px 90px rgba(61, 23, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
}

.auth-kicker {
  margin: 0 0 20px;
  color: rgba(61, 23, 0, 0.42);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.26em;
}

.auth-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.92;
}

.auth-card > p:not(.auth-kicker):not(.auth-message):not(.auth-note) {
  margin: 24px 0 0;
  color: rgba(61, 23, 0, 0.52);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  font-weight: 800;
  line-height: 1.5;
  white-space: pre-line;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 40px;
  text-align: left;
}

.auth-form label {
  display: grid;
  gap: 10px;
  color: rgba(61, 23, 0, 0.56);
  font-size: 0.92rem;
  font-weight: 900;
}

.auth-form label[hidden] {
  display: none;
}

.auth-form input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(222, 208, 190, 0.95);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.82);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-form input:focus {
  border-color: var(--gold);
  box-shadow:
    0 0 0 4px rgba(214, 162, 54, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.auth-form button[type="submit"] {
  min-height: 60px;
  margin-top: 10px;
  border: 0;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 20px 42px rgba(61, 23, 0, 0.18);
}

.auth-form button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.64;
}

.auth-message {
  min-height: 22px;
  margin: 22px 0 0;
  color: var(--clay);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.35;
}

.auth-message.is-success {
  color: #536f49;
}

.auth-switches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.auth-switches button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.auth-switches button[hidden] {
  display: none;
}

.auth-note {
  margin: 34px 0 0;
  color: rgba(61, 23, 0, 0.36);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.55;
  white-space: pre-line;
}

.home-inner {
  display: grid;
  justify-items: center;
  width: min(100%, 1320px);
  text-align: center;
}

.home-pill {
  margin: 0 0 34px;
  padding: 11px 22px 8px;
  border: 1px solid #e7e0d8;
  border-radius: 999px;
  background: #fbfaf8;
  color: rgba(61, 23, 0, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.home-section h1 {
  display: grid;
  gap: 0.04em;
  margin: clamp(28px, 4vw, 54px) 0 0;
  color: var(--ink);
  font-size: clamp(4.8rem, 11vw, 11rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
}

.home-section h1 span,
.home-section h1 em {
  display: block;
}

.home-section h1 em {
  color: rgba(61, 23, 0, 0.16);
  font-style: italic;
}

.home-copy {
  max-width: 820px;
  margin: clamp(38px, 5vw, 68px) 0 0;
  color: rgba(61, 23, 0, 0.56);
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.45;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  margin-top: clamp(42px, 5vw, 70px);
  padding: 0 56px;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  box-shadow: 0 24px 60px rgba(61, 23, 0, 0.2);
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.home-cta::after {
  content: "→";
  margin-left: 18px;
  font-size: 1.8rem;
  line-height: 0;
}

.home-cta:hover {
  background: #4f2105;
  box-shadow: 0 28px 68px rgba(61, 23, 0, 0.26);
  transform: translateY(-2px);
}

.generator-section {
  scroll-margin-top: 78px;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr) minmax(260px, 360px);
  grid-template-areas:
    ". topbar topbar"
    "sidebar canvas palette";
  gap: 22px;
  min-height: calc(100vh - 78px);
  padding: 32px 24px;
}

.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brand-button {
  width: fit-content;
  padding: 10px 2px 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.brand-button:hover .brand-mark,
.nav-logo:hover span {
  color: var(--clay);
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: auto;
  height: auto;
  color: #3d1700;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: "League Spartan", Inter, system-ui, sans-serif;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
}

.brand-mark::after {
  content: "✦";
  position: absolute;
  top: -0.42em;
  right: -0.46em;
  color: var(--gold);
  font-size: 0.42em;
}

.brand p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand span,
.topbar p,
.panel-heading span,
.upload-zone small {
  color: var(--muted);
}

.upload-zone,
.panel,
.canvas-panel,
.palette-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 22px;
  border-style: dashed;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.upload-zone:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--gold);
  color: white;
  font-size: 1.6rem;
  line-height: 1;
}

.panel {
  padding: 20px;
}

.panel h2,
.canvas-panel h2,
.palette-panel h2 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.panel label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="number"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

input[type="range"] {
  accent-color: var(--clay);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.switch {
  display: inline-flex;
  margin: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cfc4b8;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--clay);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.stats dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.stats div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.stats dt {
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-weight: 800;
}

.workspace {
  display: contents;
}

.topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3rem);
  letter-spacing: 0;
}

.topbar p {
  max-width: 680px;
  margin: 8px 0 0;
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actions button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: white;
  cursor: pointer;
}

.actions button + button {
  background: transparent;
  color: var(--ink);
}

.stage-grid {
  display: contents;
}

.canvas-panel,
.palette-panel {
  min-width: 0;
  box-shadow: var(--shadow);
}

.canvas-panel {
  grid-area: canvas;
}

.palette-panel {
  grid-area: palette;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
}

.preview-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-tools button {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.preview-tools button:hover {
  border-color: var(--gold);
}

#zoomValue {
  min-width: 46px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

#statusText {
  margin-left: 8px;
}

.canvas-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 640px;
  padding: 18px;
  overflow: auto;
  background-image:
    linear-gradient(45deg, rgba(53, 22, 4, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(53, 22, 4, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(53, 22, 4, 0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(53, 22, 4, 0.045) 75%);
  background-position:
    0 0,
    0 12px,
    12px -12px,
    -12px 0;
  background-size: 24px 24px;
}

canvas {
  height: auto;
  background: rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
}

.empty-state {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 248, 0.84);
}

.empty-state[hidden] {
  display: none;
}

.empty-logo {
  color: #3d1700;
  font-family: "League Spartan", Inter, system-ui, sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.9;
}

.usage-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 150px);
  padding: 14px;
  overflow: auto;
}

.usage-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.swatch {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(53, 22, 4, 0.2);
  border-radius: 50%;
}

.usage-item strong,
.usage-item small {
  display: block;
}

.usage-item small {
  color: var(--muted);
}

.usage-item em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(57, 47, 39, 0.34);
  backdrop-filter: blur(16px);
}

.info-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: min(84vh, 900px);
  padding: clamp(28px, 5vw, 56px);
  overflow: auto;
  border-radius: 46px;
  background: white;
  box-shadow: 0 26px 80px rgba(61, 23, 0, 0.18);
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 34px;
  border: 0;
  background: transparent;
  color: rgba(61, 23, 0, 0.45);
  font-size: 2.3rem;
  cursor: pointer;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 40px;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fbfaf8;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 900;
}

.info-modal h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-style: italic;
  letter-spacing: 0;
}

.modal-body {
  color: #5d5651;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.55;
  text-transform: uppercase;
}

.modal-body p {
  margin: 0 0 26px;
}

.site-footer {
  padding: clamp(52px, 6vw, 88px) clamp(24px, 7vw, 108px) clamp(34px, 5vw, 60px);
  border-top: 1px solid var(--line);
  background: #fffdf8;
}

.footer-inner {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(135px, 0.72fr) minmax(190px, 0.72fr) minmax(110px, 0.5fr);
  gap: clamp(30px, 4vw, 72px);
  align-items: start;
}

.site-footer p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.footer-brand p {
  max-width: 300px;
  font-size: 1.05rem;
  white-space: pre-line;
}

.footer-brand {
  display: grid;
  justify-items: start;
  text-align: left;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h3 {
  margin: 0 0 16px;
  color: rgba(61, 23, 0, 0.48);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.footer-col a,
.footer-col button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.footer-col a:hover,
.footer-col button:hover {
  color: var(--clay);
}

.footer-visit {
  max-width: 245px;
}

.footer-address {
  color: rgba(61, 23, 0, 0.74);
  font-weight: 850;
  line-height: 1.45;
}

.footer-schedule {
  margin-top: 16px;
  color: rgba(61, 23, 0, 0.42);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.55;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(46px, 5vw, 78px);
  padding-top: 28px;
  border-top: 1px solid rgba(61, 23, 0, 0.08);
  color: rgba(61, 23, 0, 0.32);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.modal-list,
.faq-list,
.contact-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modal-list li,
.faq-item,
.contact-item {
  padding: 20px 24px;
  border: 1px solid #f0ece7;
  border-radius: 18px;
  background: #fbfaf8;
}

.faq-item strong,
.contact-item strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}

@media (max-width: 980px) {
  .site-nav {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 16px;
  }

  .nav-links,
  .nav-actions {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .app-shell,
  .stage-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-areas:
      "topbar"
      "sidebar"
      "canvas"
      "palette";
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .sidebar {
    border: 0;
  }

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

  .actions {
    justify-content: flex-start;
  }

  .canvas-wrap {
    min-height: 430px;
  }

  .usage-list {
    max-height: 420px;
  }
}
