/* Focused workspace: a browsing canvas first, tools only when they are needed. */
.topbar {
  height: 76px;
  gap: 44px;
}
main {
  padding-top: 26px;
}
.page-heading {
  margin-bottom: 24px;
}
.page-heading .eyebrow {
  display: none;
}
.page-heading h1 {
  margin: 0 0 9px;
  font-size: clamp(29px, 2.6vw, 36px);
  letter-spacing: -1.1px;
}
.page-heading p {
  max-width: 760px;
  font-size: 14px;
}
.wall-layout {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.wall-layout.panel-collapsed,
.wall-layout.panel-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.panel-hidden #inspector,
.panel-hidden #close-context,
.panel-collapsed #close-context,
#toggle-panel {
  display: none;
}
.wall-panel {
  height: clamp(490px, calc(100svh - 245px), 820px);
  min-height: 0;
}
.wall-topline {
  padding: 12px 16px;
  gap: 12px;
}
.wall-actions {
  gap: 8px;
}
.wall-actions > button {
  min-height: 38px;
  height: 38px;
  padding-inline: 13px;
}
.wall-actions #help-button {
  width: 38px;
}
#reserve-space {
  border-color: #46513c;
  color: var(--text);
}
.canvas-controls {
  min-height: 52px;
  padding: 8px 14px;
}
body:not(.is-creating) .tool-group {
  display: none;
}
body:not(.is-creating) .canvas-controls {
  justify-content: flex-end;
}
.zoom-group button {
  min-width: 34px;
  min-height: 34px;
}
.wall-foot {
  align-items: center;
  min-height: 36px;
  padding: 7px 16px;
  gap: 12px;
}
body:not(.is-creating) #coordinates {
  display: none;
}
#inspector {
  min-height: 0;
  max-height: clamp(490px, calc(100svh - 245px), 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #4f623e var(--panel);
  padding: 24px;
}
#inspector > .section-label:first-child {
  padding-right: 24px;
}
#inspector > .creation-steps:first-child {
  padding-right: 22px;
  gap: 10px;
  flex-wrap: wrap;
}
#inspector .grow {
  min-height: 12px;
}
#close-context {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
#close-context:hover {
  color: var(--text);
  border-color: var(--line);
}
.artwork-preview-button {
  margin-top: 0;
}
.artwork-preview-button canvas {
  height: 132px;
}
.artwork-heading h2 {
  margin-top: 18px;
  font-size: 23px;
  overflow-wrap: anywhere;
}
.artwork-backing {
  margin-top: 18px;
  padding: 16px 0 0;
}
.artwork-backing > strong {
  font-size: 27px;
  letter-spacing: -0.6px;
}
.artwork-earned {
  margin-top: 18px;
  padding-top: 16px;
}
.artwork-earned > strong {
  font-size: 21px;
}
.artwork-owner-actions {
  margin: 20px 0 0;
  gap: 8px;
}
.owner-rewards-note {
  margin-top: 10px;
  font-size: 11px;
}
footer {
  padding-block: 24px;
  margin-top: 24px;
}
.gallery-filters {
  margin-bottom: 16px;
}
.gallery-toolbar {
  margin-bottom: 20px;
  gap: 16px;
}
.gallery {
  gap: 20px;
}
.gallery .art-card {
  padding: 12px;
  border-radius: 10px;
  min-width: 0;
}
.gallery .art-meta {
  padding: 4px 2px 2px;
}
.gallery .art-card .art-meta > strong {
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.gallery .art-card .card-value {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
}
.gallery .art-card .card-value > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.art-card .card-rewards {
  color: #bcb3ce;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 5px;
}
.rewards-card {
  padding: 24px;
  margin-bottom: 28px;
}
.rewards-top {
  gap: 20px;
}
.rewards-top .section-label {
  margin-bottom: 0;
  font-size: 11px;
  letter-spacing: 0.9px;
}
.reward-amount {
  margin: 10px 0 7px;
  font-size: clamp(28px, 3vw, 36px);
}
.rewards-top p {
  font-size: 13px;
  max-width: 600px;
}
.account-balances {
  gap: 24px;
  margin-top: 20px;
  padding: 18px 0;
}
.account-balances > div {
  gap: 6px;
}
.account-balances strong {
  font-size: 17px;
}
.reward-explanation {
  padding-top: 14px;
}
.reward-explanation p {
  margin-top: 12px;
}
/* The palette belongs beside the brush controls, not between account fields. */
.studio-main .palette {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0 12px;
}
.studio-main .swatch {
  min-height: 30px;
  min-width: 0;
}
.studio-main .custom-color-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.studio-main .custom-color-field .color-input {
  width: 44px;
  height: 32px;
  margin: 0;
  border-radius: 6px;
}
.studio-settings {
  align-content: start;
}
.immersive .wall-layout {
  position: fixed;
}
.immersive .wall-panel,
.immersive #inspector {
  height: 100%;
  max-height: none;
}
@media (max-width: 1150px) and (min-width: 761px) {
  .topbar {
    gap: 32px;
  }
  .wall-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  #inspector {
    padding: 20px;
  }
  .wall-topline {
    flex-wrap: wrap;
  }
  .wall-actions {
    flex-wrap: wrap;
    margin-left: auto;
  }
}
@media (max-width: 760px) {
  .topbar {
    min-height: 0;
    height: auto;
    gap: 10px;
    padding: 12px 16px 0;
  }
  .brand {
    font-size: 25px;
  }
  .brand-mark {
    width: 20px;
    height: 20px;
  }
  .header-end {
    gap: 0;
  }
  .wallet {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 11px;
  }
  .topbar nav {
    height: 42px;
    justify-content: space-between;
    gap: 16px;
  }
  .nav-item {
    min-width: 68px;
    font-size: 13px;
    text-align: center;
  }
  main {
    padding: 20px 12px 0;
  }
  .page-heading {
    margin-bottom: 18px;
    padding-inline: 4px;
  }
  .page-heading h1 {
    font-size: 29px;
    letter-spacing: -0.8px;
    margin-bottom: 8px;
  }
  .page-heading p {
    font-size: 12px;
    line-height: 1.6;
  }
  .wall-layout,
  .wall-layout.panel-collapsed,
  .wall-layout.panel-hidden {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .wall-panel {
    height: clamp(430px, 65svh, 720px);
    border-radius: 10px;
  }
  .wall-topline {
    padding: 10px;
    gap: 9px;
  }
  .wall-topline .live-label {
    width: 100%;
    font-size: 10px;
    gap: 8px;
  }
  .wall-actions {
    display: flex;
    width: 100%;
    gap: 6px;
    margin: 0;
  }
  .wall-actions > button {
    flex: 1 1 auto;
    height: 38px;
    min-height: 38px;
    font-size: 11px;
    padding-inline: 8px;
  }
  .wall-actions #help-button {
    flex: 0 0 34px;
    width: 34px;
  }
  .canvas-controls {
    min-height: 48px;
    padding: 5px 9px;
    gap: 5px;
  }
  .tool-group {
    gap: 3px;
  }
  .tool {
    width: 34px;
    height: 36px;
  }
  .zoom-group {
    gap: 2px;
  }
  .zoom-group button {
    min-width: 31px;
    min-height: 36px;
  }
  .zoom-group output {
    width: 40px;
    font-size: 11px;
  }
  .wall-foot {
    padding: 7px 10px;
    gap: 5px 8px;
    min-height: 34px;
    font-size: 10px;
  }
  .wall-foot #coordinates {
    display: none;
  }
  .world-wrap {
    padding: 24px;
  }
  /* Keep the map above the contextual sheet, rather than behind it. */
  body[data-page="wall"]:has(.wall-layout:not(.panel-collapsed):not(.panel-hidden)) .page-heading {
    display: none;
  }
  .wall-layout:not(.panel-collapsed):not(.panel-hidden) .wall-panel {
    height: calc(56svh - 132px);
    min-height: 230px;
  }
  .wall-layout:not(.panel-collapsed):not(.panel-hidden) .live-label,
  .wall-layout:not(.panel-collapsed):not(.panel-hidden) .wall-foot {
    display: none;
  }
  #inspector {
    position: fixed;
    z-index: 35;
    inset: auto 0 0;
    width: 100%;
    height: 44svh;
    min-height: 0;
    max-height: 44svh;
    padding: 20px 20px max(20px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-color: #46513d;
    box-shadow: 0 -12px 44px #0005;
  }
  #close-context {
    position: fixed;
    z-index: 36;
    top: auto;
    bottom: calc(44svh - 44px);
    right: 12px;
    width: 34px;
    height: 34px;
  }
  #inspector > .section-label:first-child {
    margin-bottom: 12px;
  }
  #inspector > .creation-steps:first-child {
    margin-bottom: 16px;
    padding-bottom: 14px;
    gap: 14px;
  }
  #inspector h2 {
    font-size: 23px;
    line-height: 1.2;
  }
  #inspector .draft-preview {
    height: 90px;
  }
  .artwork-preview-button canvas {
    height: 92px;
  }
  .artwork-heading h2 {
    margin-top: 14px;
  }
  .artwork-backing {
    padding-top: 14px;
    margin-top: 14px;
  }
  .artwork-backing > strong {
    font-size: 24px;
  }
  .artwork-earned {
    margin-top: 14px;
    padding-top: 14px;
  }
  .artwork-owner-actions {
    flex-direction: row;
    align-items: stretch;
    margin-top: 16px;
  }
  .artwork-owner-actions > button {
    width: auto;
    flex: 1;
    min-width: 0;
    padding-inline: 10px;
    font-size: 12px;
  }
  .artwork-owner-actions .release-action {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
  }
  .gallery {
    gap: 12px;
  }
  .gallery .art-card {
    padding: 8px;
  }
  .gallery .art-card .art-meta > strong {
    font-size: 14px;
  }
  .gallery .art-card .art-meta > small {
    font-size: 11px;
  }
  .gallery .art-card .card-value {
    margin-top: 9px;
    font-size: 12px;
  }
  .gallery .art-card .card-value > span {
    font-size: 11px;
  }
  .gallery-toolbar {
    gap: 8px;
    font-size: 12px;
    margin-bottom: 16px;
  }
  .gallery-filters {
    margin-bottom: 12px;
  }
  .rewards-card {
    padding: 20px;
    margin-bottom: 24px;
  }
  .rewards-top {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .rewards-top > button {
    width: auto;
    min-width: 100px;
    min-height: 42px;
    padding: 11px 14px;
    font-size: 12px;
  }
  .reward-amount {
    font-size: 30px;
  }
  .account-balances {
    gap: 16px;
    padding: 16px 0;
    margin-top: 18px;
  }
  .account-balances strong {
    font-size: 15px;
  }
  .account-balances span,
  .account-balances small {
    font-size: 11px;
    line-height: 1.5;
  }
  .studio-main .palette {
    margin: 12px 0 10px;
    gap: 7px;
  }
  .studio-main .swatch {
    min-height: 27px;
  }
  .studio-settings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
  }
  .studio-settings .upload-label {
    margin: 0;
  }
  footer {
    margin-top: 16px;
    padding-block: 20px;
  }
  .immersive .wall-layout {
    inset: 0;
    border-radius: 0;
  }
  .immersive .wall-panel {
    height: 100svh;
    border-radius: 0;
  }
  .immersive .wall-layout:not(.panel-collapsed):not(.panel-hidden) .wall-panel {
    height: 56svh;
    min-height: 0;
  }
  .immersive #inspector {
    height: 44svh;
    max-height: 44svh;
  }
}
@media (max-width: 370px) {
  .brand {
    font-size: 23px;
    gap: 8px;
  }
  .wall-actions > button {
    padding-inline: 6px;
    font-size: 10px;
  }
  .gallery-toolbar {
    flex-wrap: wrap;
  }
  .studio-main .swatch {
    min-height: 24px;
  }
}

.empty-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.empty-state .empty-actions > button {
  margin: 0;
  min-height: 46px;
  padding: 12px 20px;
}
.studio-settings > .palette:first-child {
  margin-top: 0;
}
.studio-settings .custom-color-field {
  margin-bottom: 18px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .gallery .empty-state {
    padding: 36px 20px;
    min-height: 0;
  }
  .empty-state .big-number {
    font-size: 44px;
  }
  .empty-state h2 {
    font-size: 24px;
    line-height: 1.3;
  }
  .empty-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .studio-settings .custom-color-field {
    margin-bottom: 0;
  }
}

.inspector-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
#inspector .inspector-actions > button {
  margin-top: 0;
}
@media (max-width: 760px) {
  .editor-actions .studio-price {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4px;
  }
  .editor-actions .studio-price strong,
  .editor-actions .studio-price small {
    max-width: 100%;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .editor-actions .studio-price strong {
    font-size: 14px;
    line-height: 1.4;
  }
  .editor-actions .studio-price small {
    font-size: 11px;
    line-height: 1.4;
  }
  #inspector .inspector-actions {
    position: sticky;
    bottom: -20px;
    z-index: 2;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin: 16px -20px -20px;
    padding: 12px 20px max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 -8px 18px #181b18ed;
  }
  #inspector .inspector-actions > button {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    min-height: 40px;
    padding: 10px 8px;
    font-size: 12px;
    white-space: normal;
    line-height: 1.3;
  }
  #inspector .inspector-actions > .primary {
    grid-column: 1 / -1;
    min-height: 44px;
  }
}

.mobile-selection-cost {
  display: none;
}
@media (max-width: 760px) {
  .mobile-selection-cost {
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    align-items: baseline;
  }
  .mobile-selection-cost strong {
    font-size: 12px;
    font-weight: 600;
  }
  .mobile-selection-cost span {
    color: var(--muted);
    font-size: 11px;
  }
}
/* Small/landscape phones need a scrollable page instead of two cramped panes. */
@media (max-width: 760px) and (max-height: 650px) {
  body:not(.immersive) .wall-layout:not(.panel-collapsed):not(.panel-hidden) .wall-panel {
    height: 300px;
    min-height: 0;
  }
  body:not(.immersive) #inspector {
    position: relative;
    inset: auto;
    height: auto;
    max-height: none;
    margin-top: 12px;
    border-radius: 12px;
    overflow: visible;
  }
  body:not(.immersive) #close-context {
    position: absolute;
    top: 322px;
    bottom: auto;
    right: 12px;
  }
  body:not(.immersive) #inspector .inspector-actions {
    position: static;
  }
  .immersive .wall-layout:not(.panel-collapsed):not(.panel-hidden) .wall-panel {
    min-height: 0;
  }
}
/* Start with an intent; dimensions follow only when drawing. */
.creation-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0 16px;
}
.creation-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 22px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #131912;
}
.creation-choice:hover,
.creation-choice:focus-visible {
  border-color: var(--lime);
  background: #202c1b;
}
.creation-choice:disabled {
  opacity: 0.6;
  cursor: progress;
}
.creation-choice .choice-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #2c3c21;
  color: var(--lime);
  font-size: 23px;
  margin-bottom: 6px;
}
.creation-choice strong {
  font-size: 17px;
}
.creation-choice small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.artwork-file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.artwork-file-actions button {
  font-size: 12px;
  padding: 8px 0;
}
.importing-image {
  width: 760px;
}
.importing-image .crop-resolution .quick-sizes {
  flex-wrap: wrap;
}
.importing-image .crop-resolution .chip {
  font-size: 12px;
}
/* The sticky footer owns the bottom inset; do not also pad its scroll container. */
.importing-image #import-workspace {
  padding-bottom: 0;
}
.importing-image .crop-footer {
  position: sticky;
  bottom: 0;
  background: var(--panel);
  padding: 16px 0 24px;
  z-index: 2;
}
.importing-image .studio-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
@media (max-width: 760px) {
  .creation-choice {
    padding: 16px;
  }
  .creation-choice strong {
    font-size: 15px;
  }
  .creation-choices {
    gap: 10px;
  }
  .importing-image .crop-footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .importing-image .crop-stage {
    height: 220px;
    min-height: 180px;
  }
  .importing-image .crop-resolution {
    margin: 16px 0;
  }
  .importing-image .crop-resolution .chip {
    padding-inline: 8px;
    font-size: 11px;
  }
}
.square-toggle {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.square-toggle.active {
  border-color: var(--lime);
  color: var(--lime);
  background: #354327;
}
.square-toggle[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .canvas-controls {
    flex-wrap: wrap;
  }
  .canvas-controls .zoom-group {
    margin-left: auto;
  }
  .square-toggle {
    padding-inline: 7px;
    font-size: 11px;
  }
}
