/* Hub — Designer de artes: editor paisagem, independente do assistente. */
#designerPanel[hidden] {
  display: none !important;
}

body.app-focus-mode.is-designing #toolView {
  min-height: 100dvh;
  overflow: hidden;
}

body.app-focus-mode.is-designing #toolView .tool-view-head {
  flex: 0 0 auto;
}

#designerPanel {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  color: #f5f8ff;
}

#designerPanel[data-view="welcome"] {
  min-height: calc(100dvh - 75px);
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 25%, #162b46, #0c1727 70%);
  padding: 20px;
}

.designer-welcome {
  box-sizing: border-box;
  width: min(800px, 100%);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: clamp(20px, 3.5vw, 38px);
  border: 1px solid #416080;
  border-radius: 23px;
  background: #1c3048;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .24);
}

.designer-eyebrow {
  display: block;
  color: #ffae88;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}

.designer-welcome h2 {
  margin: 15px 0 8px;
  color: white;
  font-size: clamp(25px, 3.2vw, 39px);
  line-height: 1.2;
}

.designer-welcome>p {
  color: #bfcbdb;
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.6;
}

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

.designer-start-choice {
  display: grid;
  justify-items: center;
  text-align: center;
  align-content: center;
  gap: 7px;
  min-height: 140px;
  background: #0c1a2d;
  border: 2px solid #425976;
  border-radius: 16px;
  padding: 15px;
  color: #eaf2fa;
  position: relative;
  cursor: pointer;
}

.designer-start-choice.selected {
  border-color: #ffab7f;
  background: #2a2834;
  box-shadow: 0 0 0 1px rgba(255, 157, 107, .3);
}

.designer-start-choice input {
  position: absolute;
  top: 14px;
  right: 14px;
  accent-color: #ffa477;
  width: 19px;
  height: 19px;
}

.designer-start-icon {
  font-size: 29px;
  color: #ffb78a;
}

.designer-start-choice strong {
  font-size: 16px;
  color: #fff;
}

.designer-start-choice small {
  font-size: 12px;
  color: #c7d1e1;
}

.designer-template-list {
  margin-top: 22px;
}

.designer-template-list[hidden] {
  display: none !important;
}

.designer-template-list>p {
  color: #dfebfb;
  font-size: 13px;
  font-weight: 750;
}

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

.designer-template-option {
  border: 2px solid #425976;
  color: #eff6ff;
  display: grid;
  gap: 4px;
  justify-items: stretch;
  text-align: left;
  background: #0b1a2b;
  border-radius: 12px;
  padding: 7px;
  cursor: pointer;
  font: inherit;
  min-width: 0;
}

.designer-template-option.selected {
  border-color: #ffa578;
  background: #34282e;
}

.designer-template-option canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  background: white;
  border-radius: 7px;
}

.designer-template-option strong {
  font-size: 12px;
}

.designer-template-option small {
  font-size: 11px;
  color: #b5c5d7;
}

.designer-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: min(100%, 300px);
  min-height: 50px;
  margin: 20px 0 8px;
  padding: 10px 20px;
  background: #ff9f76;
  border: 0;
  border-radius: 12px;
  color: #111928;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.designer-primary:hover {
  background: #ffc198;
}

.designer-privacy {
  display: block;
  color: #afc2d4;
  font-size: 12px;
  line-height: 1.5;
}

.designer-restore {
  display: block;
  margin-top: 12px;
  background: transparent;
  border: 1px solid #6c839d;
  border-radius: 9px;
  padding: 10px 12px;
  color: #fff;
  cursor: pointer;
}

#designerPanel[data-view="editor"] {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 72px);
  min-height: 380px;
  padding: 0;
  overflow: hidden;
  background: #081424;
}

.designer-editor-surface {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.designer-editor-top {
  flex: 0 0 auto;
  min-height: 43px;
  padding: 6px clamp(12px, 2vw, 28px);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  background: #122338;
  border-bottom: 1px solid #334a65;
  box-sizing: border-box;
}

.designer-editor-top strong {
  color: #fff;
  font-size: 16px;
}

.designer-editor-top span {
  color: #c1cfdd;
  font-size: 12px;
}

.designer-editor-top button {
  flex: 0 0 auto;
  border: 1px solid #526b86;
  border-radius: 9px;
  background: #213951;
  color: #f2f7ff;
  padding: 7px 12px;
  font-weight: 750;
  font-size: 12px;
  cursor: pointer;
}

.designer-drawing-area {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1.3vw, 18px);
  box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 50%, #264264 0%, #0d1b2c 65%, #091320 100%);
}

.designer-canvas-shadow {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: 100%;
  overflow: hidden;
  border: 2px solid #a8bed3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  box-sizing: border-box;
}

#designerCanvas {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  background: white;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  object-fit: contain;
}

.designer-bottom-dock {
  flex: 0 0 auto;
  width: 100%;
  padding: 10px clamp(8px, 1.2vw, 18px) 5px;
  box-sizing: border-box;
  background: #132338;
  border-top: 1px solid #51647a;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
}

.designer-dock-row {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.designer-dock-scroll {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 13px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 2px 9px;
  scroll-snap-type: x proximity;
  scrollbar-color: #67819b #102036;
}

.designer-toolbar-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid #415a72;
  scroll-snap-align: start;
}

.designer-toolbar-group button,
.designer-file-action {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 4px;
  min-width: 57px;
  min-height: 54px;
  padding: 6px 7px;
  background: #28415d;
  color: #fff;
  border: 1px solid #536c85;
  border-radius: 9px;
  box-sizing: border-box;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.designer-toolbar-group button span,
.designer-file-action span {
  font-size: 11px;
  font-weight: 700;
}

.designer-toolbar-group button:hover:not(:disabled),
.designer-file-action:hover {
  background: #375b7d;
}

.designer-toolbar-group button.is-active,
.designer-toolbar-group button[aria-pressed="true"] {
  background: #ffaa7e;
  border-color: #ffc49d;
  color: #152334;
}

.designer-toolbar-group button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.designer-toolbar-options label {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 7px;
  row-gap: 3px;
  color: #e3eefd;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.designer-toolbar-options input[type="color"] {
  width: 38px;
  height: 36px;
  padding: 1px;
  background: #263850;
  border: 1px solid #65839d;
  border-radius: 7px;
  cursor: pointer;
}

.designer-toolbar-options input[type="range"] {
  width: 102px;
  max-width: 22vw;
  accent-color: #ffae86;
}

.designer-toolbar-options select {
  max-width: 115px;
  min-height: 36px;
  padding: 5px;
  background: #263850;
  color: #fff;
  border: 1px solid #66829c;
  border-radius: 8px;
}

.designer-dock-save {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}

.designer-dock-save button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  min-height: 54px;
  min-width: 59px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid #ffc09b;
  background: #ffae80;
  color: #132235;
  font: inherit;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
}

.designer-dock-save button span {
  font-size: 11px;
  white-space: nowrap;
}

.designer-dock-save button:hover {
  background: #ffd0ac;
}

.designer-toolbar-footer {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  color: #c3d2de;
  font-size: 12px;
  padding: 3px 2px 5px;
  line-height: 1.3;
}

.designer-toolbar-footer span:last-child {
  color: #9dbbab;
  white-space: nowrap;
}

#designerPanel button:focus-visible,
#designerPanel input:focus-visible,
#designerPanel select:focus-visible,
#designerPanel label:focus-within {
  outline: 3px solid #ffd1ac;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  #designerPanel[data-view="welcome"] {
    padding: 12px;
  }

  .designer-welcome {
    max-height: calc(100dvh - 94px);
    padding: 18px;
  }

  .designer-start-choice {
    min-height: 120px;
    padding: 11px;
  }

  .designer-start-choice strong {
    font-size: 13px;
  }

  .designer-start-choice small {
    font-size: 11px;
  }

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

  .designer-editor-top strong {
    font-size: 13px;
  }

  .designer-editor-top span {
    display: none;
  }

  #designerPanel[data-view="editor"] {
    height: calc(100dvh - 68px);
    min-height: 280px;
  }

  .designer-drawing-area {
    padding: 5px;
  }

  .designer-toolbar-group {
    gap: 5px;
  }

  .designer-toolbar-group button,
  .designer-file-action {
    min-width: 51px;
    min-height: 51px;
  }

  .designer-dock-save button {
    min-width: 47px;
    padding: 6px 7px;
    min-height: 51px;
  }

  .designer-dock-save button span {
    font-size: 10px;
  }

  .designer-toolbar-footer span:last-child {
    display: none;
  }

  .designer-toolbar-footer {
    font-size: 11px;
  }
}

@media (orientation: portrait) and (max-width: 700px) {
  .designer-drawing-area {
    background: linear-gradient(145deg, #15344a, #0a1725);
  }

  .designer-canvas-shadow {
    max-width: 100%;
    width: 100%;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #designerPanel * {
    scroll-behavior: auto !important;
  }
}

/* v20261106-backdock1 — Designer: Voltar primeiro no rodapé só no editor.
   Na introdução o botão continua disponível no topo. */
body.app-focus-mode.is-designing.is-designer-editing #toolView .tool-view-head {
  display: none !important;
}

body.app-focus-mode.is-designing.is-designer-editing #designerPanel[data-view="editor"] {
  height: calc(100dvh - env(safe-area-inset-bottom, 0px)) !important;
}

body.app-focus-mode.is-designing.is-designer-editing #designerPanel .designer-dock-row #backHome.dock-back-button {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 54px !important;
  min-width: 84px !important;
  width: auto !important;
  padding: 6px 12px !important;
  border: 1px solid #526b86 !important;
  border-radius: 9px !important;
  background: #28415d !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

@media (max-width: 700px) {
  body.app-focus-mode.is-designing.is-designer-editing #designerPanel .designer-dock-row #backHome.dock-back-button {
    min-height: 51px !important;
    min-width: 66px !important;
    padding: 6px 7px !important;
    font-size: 12px !important;
  }
}