/*
 * PMP Create Pro — original production-workspace shell.
 * This stylesheet deliberately changes visual arrangement only. Existing IDs,
 * panels and editor event wiring remain untouched.
 */

:root {
  --purple: #0d9488;
  --purple2: #08766f;
  --cyan: #16b8ad;
  --ink: #17212b;
  --muted: #66717d;
  --line: #d8e0e6;
  --stage: #e8edf1;
  --top: #0b1722;
  --green: #52a942;
  --pmp-navy: #0b1722;
  --pmp-navy-2: #132433;
  --pmp-teal: #0d9488;
  --pmp-teal-bright: #20c8bb;
  --pmp-orange: #f28c28;
  --pmp-cloud: #f5f7f8;
  --pmp-stage: #e8edf1;
  --pmp-shadow: 0 18px 46px rgba(10, 25, 36, .18);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: var(--pmp-teal);
}

body {
  background: var(--pmp-stage);
  color: var(--ink);
}

/* Production command header */
.topbar {
  height: 68px;
  flex-basis: 68px;
  gap: 10px;
  padding: 0 15px;
  position: relative;
  background:
    linear-gradient(90deg, rgba(32, 200, 187, .08), transparent 24%),
    linear-gradient(110deg, var(--pmp-navy), var(--pmp-navy-2));
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 6px 20px rgba(8, 19, 28, .22);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pmp-teal-bright) 0 68%, var(--pmp-orange) 68% 100%);
}

.brand {
  min-width: 162px;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, .12);
}

.brand strong {
  font-size: 14px;
  letter-spacing: .01em;
}

.brand em {
  background: var(--pmp-orange);
  color: #17212b;
  letter-spacing: .65px;
}

.topbar .brand-orb {
  width: 39px;
  height: 39px;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .24));
}

.file-nav {
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
}

.file-nav button,
.history-nav button,
.top-actions > button {
  height: 34px;
  border-radius: 7px;
  color: #eaf2f5;
  font-size: 10px;
}

.file-nav button:hover,
.history-nav button:hover,
.top-actions > button:hover {
  background: rgba(32, 200, 187, .15);
}

.project-title {
  justify-content: flex-start;
  max-width: 330px;
  min-width: 168px;
  margin-left: 4px;
}

.project-title::before {
  content: "ACTIVE JOB";
  color: #7f9cab;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.15px;
}

.project-title input {
  width: min(190px, 18vw);
  padding: 7px 8px;
  border-radius: 6px;
  color: #fff;
  text-align: left;
}

.project-title small {
  color: #7dd7ce;
}

.history-nav {
  margin-left: auto;
  padding-right: 5px;
  border-right: 1px solid rgba(255, 255, 255, .11);
}

.top-actions {
  gap: 5px;
}

.top-actions > button.save-project-button {
  background: rgba(32, 200, 187, .12);
  box-shadow: inset 0 0 0 1px rgba(32, 200, 187, .25);
}

.gradient-button,
.quote-submit,
.resize-apply,
.mockup-download {
  background: linear-gradient(110deg, #ee7e20, #f5a13f) !important;
  color: #17212b !important;
  box-shadow: 0 5px 14px rgba(242, 140, 40, .2) !important;
}

/* Large canvas plus a horizontal production-tool dock */
.editor-shell {
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 70px;
  background: var(--pmp-stage);
}

.workspace {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

.tool-rail {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: 70px;
  padding: 7px 16px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  background: #101e2a;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 -8px 24px rgba(10, 25, 36, .13);
  z-index: 32;
}

.tool-rail::before {
  content: "CREATE TOOLS";
  flex: 0 0 auto;
  margin-right: 9px;
  color: #6f8b99;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.35px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.tool-rail button {
  width: 84px;
  min-width: 84px;
  min-height: 52px;
  padding: 5px 10px;
  flex-direction: row;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #c6d3d9;
  background: transparent;
  font-size: 9px;
  font-weight: 750;
}

.tool-rail button i,
.tool-rail .rail-icon {
  flex: 0 0 24px;
  color: #9fb2bb;
}

.tool-rail button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.tool-rail button.active {
  color: #fff;
  background: rgba(32, 200, 187, .14);
  border-color: rgba(32, 200, 187, .34);
  box-shadow: inset 3px 0 0 var(--pmp-teal-bright);
}

.tool-rail button.active i,
.tool-rail button.active .rail-icon {
  color: var(--pmp-teal-bright);
}

/* Floating resource console opens from the right. */
.asset-panel {
  position: absolute;
  left: auto;
  right: 16px;
  top: 16px;
  bottom: 86px;
  width: 370px;
  max-width: calc(100vw - 32px);
  padding: 18px 17px 24px;
  transform: translateX(calc(100% + 32px));
  visibility: hidden;
  opacity: 0;
  overflow-y: auto;
  border: 1px solid rgba(13, 148, 136, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: -12px 18px 42px rgba(10, 25, 36, .2);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
  z-index: 35;
}

.editor-shell.panel-open .asset-panel {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
}

.panel-title {
  padding-bottom: 12px;
  border-bottom: 1px solid #e3e9ec;
}

.panel-title small,
.section-kicker,
.drawer-head small,
.dialog-head small {
  color: var(--pmp-teal);
}

.panel-title h2 {
  color: #10212d;
  letter-spacing: -.02em;
}

.search-box,
.color-studio-search {
  border-color: #cfdadf;
  border-radius: 10px;
  background: #f8fafb;
}

.search-box:focus-within,
.color-studio-search:focus-within,
.resize-search:focus-within {
  border-color: var(--pmp-teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.chip-row button.active,
.resize-preset.active,
.layer-row.active {
  border-color: rgba(13, 148, 136, .45);
  background: #eaf8f6;
  color: #086c65;
}

.section-head button,
.workspace-hint button {
  color: var(--pmp-teal);
}

/* Production stage */
.stage {
  background-color: var(--pmp-stage);
  background-image:
    linear-gradient(rgba(255, 255, 255, .42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .42) 1px, transparent 1px);
  background-size: 24px 24px;
}

.stage.no-grid {
  background-image: none;
}

.stage::after {
  content: "PMP PRODUCTION WORKSPACE";
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: rgba(53, 75, 88, .38);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.45px;
  pointer-events: none;
}

.stage-meta {
  left: 16px;
  top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(13, 148, 136, .2);
  border-left: 3px solid var(--pmp-teal);
  border-radius: 7px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 4px 14px rgba(10, 25, 36, .08);
}

.stage-meta::before {
  content: "PRODUCT  ";
  color: #71808a;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .8px;
}

.stage-options {
  left: 16px;
  right: auto;
  top: 52px;
  max-width: calc(100% - 32px);
  flex-wrap: wrap;
}

.stage-options button,
.canvas-color-control {
  border-color: #cad5db;
  background: rgba(255, 255, 255, .94);
  color: #43525c;
  box-shadow: 0 3px 10px rgba(10, 25, 36, .06);
}

.stage-options button:hover,
.stage-options button.active {
  border-color: var(--pmp-teal);
  background: #eaf8f6;
  color: #086c65;
}

.stage-options #templateBackgroundButton,
.stage-options #templateBackgroundButton.background-off,
.context-toolbar .replace-image-button {
  border-color: rgba(13, 148, 136, .45);
  background: #eaf8f6;
  color: #086c65;
}

.canvas-viewport {
  inset: 94px 24px 55px;
}

.canvas-frame {
  border: 1px solid rgba(26, 45, 57, .12);
  box-shadow: 0 20px 45px rgba(15, 31, 42, .22), 0 3px 8px rgba(15, 31, 42, .12);
}

.canvas-size-label {
  left: auto;
  right: 7px;
  top: 7px;
  border-color: rgba(13, 148, 136, .25);
  background: #10212d;
  color: #dff9f6;
  box-shadow: 0 4px 12px rgba(10, 25, 36, .18);
  letter-spacing: .03em;
}

.context-toolbar {
  top: 14px;
  max-width: calc(100% - 390px);
  height: 46px;
  border-color: #cfdadf;
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 24px rgba(10, 25, 36, .15);
}

.context-toolbar.has-selection {
  transform: translateX(-50%) translateY(0);
}

.context-toolbar button:hover {
  background: #eaf8f6;
}

.workspace-hint {
  left: auto;
  right: 16px;
  bottom: 16px;
  border-color: #cfdadf;
  box-shadow: 0 7px 22px rgba(10, 25, 36, .12);
}

/* Compact page navigation remains separate from the creation-tool dock. */
.page-bar {
  height: 48px;
  flex-basis: 48px;
  padding: 4px 14px;
  background: rgba(247, 249, 250, .98);
  border-top: 1px solid #d2dce1;
}

.page-actions {
  bottom: 59px;
  border: 1px solid #d5dfe4;
  border-radius: 10px;
  box-shadow: 0 7px 22px rgba(10, 25, 36, .13);
}

.page-strip {
  bottom: 57px;
  border-color: #d5dfe4;
  box-shadow: var(--pmp-shadow);
}

.page-thumb.active,
.page-action:hover,
.add-page:hover {
  border-color: var(--pmp-teal);
  background: #eaf8f6;
}

.view-controls button:hover {
  background: #e5ecef;
}

/* Selection language belongs to PMP teal/orange, not purple. */
.selection-overlay {
  border-color: var(--pmp-teal-bright);
}

.selection-overlay::before {
  background: var(--pmp-teal-bright);
}

.selection-handle {
  border-color: var(--pmp-teal);
  box-shadow: 0 1px 5px rgba(7, 73, 68, .2);
}

.selection-handle[data-handle="rotate"] {
  background: var(--pmp-orange);
  border-color: #d76d0d;
}

.selection-dimension {
  border-color: #08766f;
  color: #075f59;
  box-shadow: 0 2px 8px rgba(7, 84, 77, .16);
}

.text-editor {
  outline-color: var(--pmp-teal-bright);
  caret-color: var(--pmp-teal);
  box-shadow: 0 0 0 3px rgba(32, 200, 187, .15), 0 8px 24px rgba(10, 25, 36, .2);
}

.edit-text-button,
.selection-edit-text {
  border-color: var(--pmp-teal) !important;
  background: var(--pmp-teal) !important;
  color: #fff;
}

.snap-guide {
  background: var(--pmp-orange);
}

/* Drawers and dialogs use the same production identity. */
.production-drawer {
  top: 0;
  width: 410px;
  border-left: 3px solid var(--pmp-orange);
  box-shadow: -16px 0 46px rgba(10, 25, 36, .24);
}

.drawer-head {
  background: #10212d;
  color: #fff;
  border-bottom-color: #203746;
}

.drawer-head button {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.app-dialog {
  border: 1px solid rgba(13, 148, 136, .2);
  box-shadow: var(--pmp-shadow);
}

.dialog-head {
  border-top: 4px solid var(--pmp-teal);
}

.resize-panel {
  inset: 84px 22px 92px auto;
  border-color: rgba(13, 148, 136, .22);
  border-radius: 15px;
  box-shadow: var(--pmp-shadow);
}

.resize-lock.active,
.resize-orientations button.active {
  border-color: var(--pmp-teal);
  background: #eaf8f6;
  color: #086c65;
  box-shadow: inset 0 0 0 1px var(--pmp-teal);
}

.color-studio-search button,
.color-swatch.active::after {
  border-color: var(--pmp-teal);
}

.color-studio-search button {
  background: var(--pmp-teal);
}

.pmp-brand-transition::after {
  background: linear-gradient(90deg, var(--pmp-teal-bright), var(--pmp-orange), #83c64a);
}

.toast {
  background: #10212d;
  border-left-color: var(--pmp-teal-bright);
}

/* Original PMP product-and-format chooser. */
.create-design-dialog {
  width: min(1280px, 96vw);
  height: min(820px, 92vh);
  max-width: none;
  max-height: none;
  border: 1px solid rgba(13, 148, 136, .28);
  border-radius: 20px;
  background: #eef2f4;
  box-shadow: 0 30px 90px rgba(7, 19, 28, .34);
}

.create-design-dialog::backdrop {
  background: rgba(6, 16, 24, .66);
  backdrop-filter: blur(8px);
}

.create-design-shell {
  grid-template-rows: 88px minmax(0, 1fr);
}

.create-design-head {
  gap: 24px;
  padding: 0 24px;
  border-bottom: 3px solid var(--pmp-orange);
  background:
    linear-gradient(100deg, rgba(32, 200, 187, .1), transparent 36%),
    linear-gradient(110deg, #091722, #142a38);
}

.create-design-title {
  min-width: 270px;
}

.create-design-title small,
.design-format-top > div > small {
  display: block;
  margin-bottom: 4px;
  color: var(--pmp-teal-bright);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 1.35px;
}

.create-design-head h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  letter-spacing: -.025em;
}

.create-search {
  max-width: 610px;
  height: 44px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 11px;
  background: rgba(255, 255, 255, .1);
  color: #a7bec9;
}

.create-search:focus-within {
  border-color: var(--pmp-teal-bright);
  background: #fff;
  color: #52626b;
  box-shadow: 0 0 0 3px rgba(32, 200, 187, .16);
}

.create-search input {
  color: #fff;
  font-size: 11px;
}

.create-search input::placeholder { color: #9ab0ba; }
.create-search:focus-within input { color: #17212b; }
.create-search:focus-within input::placeholder { color: #7a8992; }

.create-design-close {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.create-design-close:hover { background: rgba(255, 255, 255, .18); }

.create-design-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 92px minmax(0, 1fr);
}

.design-category-nav {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  padding: 13px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-bottom: 1px solid #d5dfe4;
  background: #f7f9fa;
  scrollbar-width: thin;
}

.design-category-nav button {
  width: auto;
  min-width: 150px;
  height: 64px;
  display: grid;
  grid-template-columns: 35px max-content auto;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid #d9e1e5;
  border-radius: 11px;
  background: #fff;
  color: #31424d;
  box-shadow: 0 2px 7px rgba(10, 25, 36, .04);
  text-align: left;
}

.design-category-nav button[data-design-category="pmp"] { min-width: 168px; }
.design-category-nav button:is([data-design-category="custom"], [data-design-category="upload"]) { min-width: 180px; }

.design-category-nav button:hover {
  border-color: rgba(13, 148, 136, .45);
  background: #eff9f7;
}

.design-category-nav button.active {
  border-color: #0b756e;
  background: #102a32;
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--pmp-orange), 0 5px 13px rgba(10, 40, 46, .16);
}

.design-category-nav i {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8f4f3;
  color: #08766f;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: -.15px;
}

.design-category-nav button.active i {
  background: var(--pmp-teal-bright);
  color: #08252a;
}

.design-category-nav span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.design-category-nav small {
  color: #8a989f;
  font-size: 7px;
  font-weight: 900;
}

.design-category-nav button.active small { color: #8cded6; }

.design-format-area {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  padding: 24px 28px 36px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(78, 99, 112, .04) 40px),
    #edf2f4;
}

.design-format-top {
  align-items: center;
  margin-bottom: 16px;
}

.design-format-top h3 {
  color: #10212d;
  font-size: 24px;
  letter-spacing: -.035em;
}

.design-format-top p {
  max-width: 720px;
  color: #647580;
  font-size: 10px;
  line-height: 1.45;
}

.design-format-count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid #d5dfe4;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: #72808a;
  font-size: 8px;
  font-weight: 800;
}

.design-format-count b { color: #10212d; font-size: 13px; }

.product-group-filters {
  display: flex;
  gap: 7px;
  margin: 0 0 19px;
  padding: 0 0 9px;
  overflow-x: auto;
}

.product-group-filters button {
  flex: 0 0 auto;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #d4dee3;
  border-radius: 8px;
  background: #fff;
  color: #42535e;
  font-size: 8px;
  font-weight: 800;
}

.product-group-filters button:hover { border-color: var(--pmp-teal); }

.product-group-filters button.active {
  border-color: #102a32;
  background: #102a32;
  color: #fff;
}

.product-group-filters small {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 99px;
  background: #edf2f4;
  color: #5d6d76;
  font-size: 7px;
  text-align: center;
}

.product-group-filters button.active small {
  background: var(--pmp-orange);
  color: #17212b;
}

.design-format-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.design-format-card {
  min-height: 282px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8e1e5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(10, 25, 36, .07);
}

.design-format-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 6;
  height: 4px;
  background: var(--accent);
}

.design-format-card:hover {
  border-color: color-mix(in srgb, var(--accent), #fff 35%);
  box-shadow: 0 17px 38px rgba(10, 25, 36, .15);
  transform: translateY(-4px);
}

.format-art {
  height: 154px;
  border-radius: 0;
}

.art-chip {
  left: 11px;
  top: 12px;
  max-width: calc(100% - 92px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-ratio {
  position: absolute;
  right: 10px;
  top: 12px;
  z-index: 5;
  max-width: 52%;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .9);
  color: #31424d;
  overflow: hidden;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .45px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-card-copy {
  display: flex;
  flex-direction: column;
  min-height: 128px;
  padding: 14px 15px 13px;
}

.format-card-kicker {
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--accent);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .7px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.design-format-card b {
  margin: 0;
  color: #152733;
  font-size: 13px;
  letter-spacing: -.015em;
}

.design-format-card small {
  margin-top: 4px;
  color: #697982;
  font-size: 8px;
}

.format-production-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.format-production-meta i {
  padding: 4px 6px;
  border: 1px solid #dce4e8;
  border-radius: 5px;
  background: #f6f8f9;
  color: #566772;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
}

.format-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #e6ecef;
  color: #0a756d;
  font-size: 8px;
  font-weight: 900;
}

.format-start strong {
  color: var(--pmp-orange);
  font-size: 16px;
  line-height: 1;
}

.empty-template-state {
  grid-column: 1 / -1;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px dashed #bfccd2;
  border-radius: 14px;
  background: rgba(255, 255, 255, .7);
  color: #667680;
  text-align: center;
}

.empty-template-state b { color: #223641; font-size: 13px; }
.empty-template-state span { font-size: 9px; }

.design-special {
  max-width: 660px;
  border-color: #d2dde2;
  border-left: 4px solid var(--pmp-teal);
  background: #fff;
  box-shadow: 0 7px 22px rgba(10, 25, 36, .08);
}

.apply-format,
.open-upload-category,
.open-create-design {
  background: linear-gradient(105deg, #0d9488, #08766f);
  color: #fff;
  box-shadow: 0 5px 14px rgba(13, 148, 136, .18);
}

.open-create-design:hover,
.apply-format:hover,
.open-upload-category:hover {
  background: linear-gradient(105deg, #08766f, #075f59);
}

/* Preview intentionally removes all studio chrome. */
.app-shell.preview-mode .workspace {
  grid-column: 1;
  grid-row: 1 / 3;
}

.app-shell.preview-mode .canvas-viewport {
  inset: 20px;
}

@media (max-width: 1180px) {
  .brand { min-width: 140px; }
  .project-title::before { display: none; }
  .project-title { max-width: 220px; }
  .top-actions > button:not(.gradient-button):not(.save-project-button) { display: none; }
  .context-toolbar { max-width: calc(100% - 44px); }
  .tool-rail button { width: 76px; min-width: 76px; }
  .design-format-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .create-design-title { min-width: 230px; }
}

@media (max-width: 760px) {
  .topbar {
    width: 100vw;
    height: 62px;
    min-height: 62px;
    flex-basis: 62px;
    flex-wrap: nowrap;
    padding: 0 8px;
  }

  .brand {
    min-width: auto;
    padding-right: 8px;
  }

  .brand strong,
  .brand em,
  .file-nav,
  .project-title,
  .history-nav {
    display: none;
  }

  .top-actions {
    flex: 1;
    justify-content: flex-end;
  }

  .editor-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 64px;
  }

  .workspace {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }

  .tool-rail {
    grid-column: 1;
    grid-row: 2;
    height: 64px;
    padding: 5px 8px;
    justify-content: flex-start;
  }

  .tool-rail::before { display: none; }

  .tool-rail button {
    width: 70px;
    min-width: 70px;
    min-height: 50px;
    flex-direction: column;
    gap: 2px;
    padding: 3px;
  }

  .tool-rail .rail-icon { transform: scale(.82); }

  .asset-panel {
    left: auto;
    right: 10px;
    top: 10px;
    bottom: 74px;
    width: calc(100vw - 20px);
    max-width: none;
    border-radius: 13px;
  }

  .canvas-viewport { inset: 110px 10px 52px; }
  .stage-options { top: 50px; }
  .context-toolbar { max-width: calc(100% - 18px); }
  .workspace-hint, .stage::after { display: none; }
  .page-actions { bottom: 55px; }
  .resize-panel { inset: 72px 8px 76px; width: auto; max-width: none; }
  .production-drawer { width: min(410px, 94vw); }

  .create-design-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .create-design-shell { grid-template-rows: 70px minmax(0, 1fr); }
  .create-design-head { gap: 9px; padding: 0 10px; }
  .create-design-title { min-width: 120px; }
  .create-design-title small { font-size: 6px; }
  .create-design-head h2 { font-size: 15px; }
  .create-search { height: 40px; }
  .create-design-body { grid-template-rows: 77px minmax(0, 1fr); }
  .design-category-nav { padding: 9px 8px; }
  .design-category-nav button { min-width: 166px; height: 57px; grid-template-columns: 31px max-content auto; padding: 0 8px; }
  .design-category-nav button[data-design-category="pmp"] { min-width: 166px; }
  .design-category-nav button:is([data-design-category="custom"], [data-design-category="upload"]) { min-width: 184px; }
  .design-category-nav i { width: 31px; height: 31px; }
  .design-category-nav span { font-size: 9px; }
  .design-format-area { padding: 16px 12px 28px; }
  .design-format-top h3 { font-size: 20px; }
  .design-format-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .design-format-card { min-height: 254px; }
  .format-art { height: 137px; }
  .format-card-copy { min-height: 117px; }
}

@media (prefers-reduced-motion: reduce) {
  .asset-panel { transition: none; }
}
