#designStudioModal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(10px);
}

#designStudioModal[aria-hidden="false"] {
  display: flex;
}

#designStudioModal[aria-hidden="true"] {
  display: none;
}

.ds-shell {
  width: min(1280px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.98), rgba(5, 10, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  color: #eef4ff;
}

.ds-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ds-topbar-left {
  display: grid;
  gap: 6px;
}

.ds-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4f7ff;
}

.ds-subtitle {
  font-size: 13px;
  color: rgba(235, 242, 255, 0.7);
  line-height: 1.45;
}

.ds-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ds-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}

.ds-sidebar {
  padding: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: auto;
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.ds-content {
  padding: 16px;
  overflow: auto;
  display: grid;
  gap: 16px;
}

.ds-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ds-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(235, 242, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.ds-tab {
  width: 100%;
  text-align: left;
  padding: 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  color: #eef4ff;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  display: grid;
  gap: 10px;
}

.ds-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 168, 255, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.ds-tab.active {
  border-color: rgba(110, 168, 255, 0.45);
  background: linear-gradient(180deg, rgba(90, 120, 255, 0.18), rgba(130, 95, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.ds-tab-title {
  font-size: 16px;
  font-weight: 800;
  color: #f4f7ff;
  line-height: 1.2;
}

.ds-tab-copy {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(235, 242, 255, 0.72);
}

.ds-panel {
  display: none;
  gap: 16px;
}

.ds-panel.active {
  display: grid;
}

.ds-card {
  border-radius: 26px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 14px;
}

.ds-card-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #f4f7ff;
}

.ds-card-copy {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(235, 242, 255, 0.72);
}

.ds-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.ds-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ds-field textarea {
  min-height: 140px;
  resize: vertical;
}

.ds-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(235, 242, 255, 0.82);
}

.ds-input,
.ds-textarea {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  color: #eef4ff;
  padding: 13px 14px;
  outline: none;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.45;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.ds-input::placeholder,
.ds-textarea::placeholder {
  color: rgba(235, 242, 255, 0.4);
}

.ds-input:focus,
.ds-textarea:focus {
  border-color: rgba(110, 168, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(110, 168, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.028));
}

.ds-output-wrap {
  display: grid;
  gap: 12px;
}

.ds-output {
  min-height: 150px;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: #eef4ff;
  line-height: 1.55;
}

.ds-output.ds-empty {
  color: rgba(235, 242, 255, 0.58);
}

.ds-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ds-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: #eef4ff;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.ds-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 168, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.ds-btn-primary {
  background: linear-gradient(135deg, rgba(90, 120, 255, 0.32), rgba(130, 95, 255, 0.22));
  border-color: rgba(110, 168, 255, 0.3);
}

.ds-btn-primary:hover {
  background: linear-gradient(135deg, rgba(90, 120, 255, 0.38), rgba(130, 95, 255, 0.28));
}

#designStudioLaunchBtn {
  appearance: none;
  min-height: 52px;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(90, 120, 255, 0.16), rgba(130, 95, 255, 0.12));
  color: #eef4ff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

#designStudioLaunchBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 168, 255, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  background: linear-gradient(135deg, rgba(90, 120, 255, 0.2), rgba(130, 95, 255, 0.15));
}

@media (max-width: 1100px) {
  .ds-shell {
    width: min(98vw, 1280px);
  }

  .ds-main {
    grid-template-columns: 1fr;
  }

  .ds-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #designStudioModal {
    padding: 12px;
  }

  .ds-topbar {
    padding: 14px;
  }

  .ds-content,
  .ds-sidebar {
    padding: 14px;
  }

  .ds-grid-2 {
    grid-template-columns: 1fr;
  }

  .ds-sidebar {
    grid-template-columns: 1fr;
  }

  .ds-title {
    font-size: 22px;
  }

  .ds-tab {
    padding: 16px 14px;
  }

  .ds-card {
    padding: 16px;
  }
}

/* ==============================
   Simo Design Studio — Safe Chip Polish
   (isolated to ds-* classes only)
============================== */

.ds-chip {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
  transition: all 0.18s ease;
}

.ds-chip:hover {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-color: rgba(255,255,255,0.18);
}

.ds-chip.active {
  background: linear-gradient(135deg, #4f6cff, #7a5cff);
  color: #ffffff;
  border-color: transparent;
  box-shadow:
    0 6px 18px rgba(79,108,255,0.25),
    0 0 0 1px rgba(255,255,255,0.05) inset;
}

/* Sidebar tab match (keeps consistency) */
.ds-tab.active {
  background: linear-gradient(135deg, #4f6cff, #7a5cff);
  border-color: transparent;
  box-shadow:
    0 8px 24px rgba(79,108,255,0.25);
}

/* Make interaction feel premium */
.ds-chip,
.ds-tab {
  cursor: pointer;
  transform: translateZ(0);
}

.ds-chip:active,
.ds-tab:active {
  transform: scale(0.98);
}

/* ==============================
   PHASE 3.6D — Output Readability Polish (SAFE)
   ============================== */

.ds-output-box,
#designStudioOutput,
.designstudio-output {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px 20px;
  line-height: 1.65;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  white-space: pre-wrap;
}

/* Section spacing */
.ds-output-box p,
.designstudio-output p {
  margin: 10px 0;
}

/* Headings inside output (like BRAND FOUNDATION, VISUAL DIRECTION) */
.ds-output-box strong,
.designstudio-output strong {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.95);
}

/* Bullet spacing */
.ds-output-box li,
.designstudio-output li {
  margin: 6px 0;
}

/* Add visual separation between sections */
.ds-output-box br + br,
.designstudio-output br + br {
  content: "";
  display: block;
  margin-bottom: 8px;
}

/* Subtle inner glow for premium feel */
.ds-output-box {
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.02),
    0 10px 30px rgba(0,0,0,0.25);
}

/* Scroll smoothing (if long output) */
.ds-output-box::-webkit-scrollbar {
  width: 6px;
}
.ds-output-box::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
}

/* ==============================
   PHASE 3.6C — SAFE OUTPUT POLISH
   (Design Studio only — no app impact)
   ============================== */

.ds-output {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ds-output pre {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  font-size: 13.5px;
  padding: 16px 18px;
  border-radius: 14px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.02)
  );

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 8px 24px rgba(0,0,0,0.35);

  overflow: auto;
  max-height: 420px;
}

/* smoother scroll */
.ds-output pre::-webkit-scrollbar {
  width: 8px;
}
.ds-output pre::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
}
.ds-output pre::-webkit-scrollbar-track {
  background: transparent;
}

/* buttons polish */
.ds-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ds-actions button {
  transition: all 0.2s ease;
}

.ds-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* section spacing consistency */
.ds-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* improve long content readability */
.ds-output strong {
  color: #ffffff;
  font-weight: 600;
}

.ds-output em {
  color: rgba(255,255,255,0.7);
}

/* subtle glow edge */
.ds-output pre::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.25);
}

/* ==============================
   PHASE 3.6E — OUTPUT DUPLICATE FIX (SAFE)
   ============================== */

/* only show the FIRST output panel */
.ds-panel .ds-output:not(:first-of-type) {
  display: none;
}

/* ==============================
   PHASE 3.7B — VISUAL POLISH (SAFE)
   append-only block
   ============================== */

.ds-shell {
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.ds-topbar {
  padding: 20px 20px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.ds-title {
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

.ds-subtitle {
  max-width: 760px;
  color: rgba(235, 242, 255, 0.74);
}

.ds-sidebar {
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at top, rgba(95, 120, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012));
}

.ds-content {
  gap: 18px;
  padding: 18px;
}

.ds-tab {
  position: relative;
  overflow: hidden;
  padding: 19px 17px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.016));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 10px 24px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.ds-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 45%);
  opacity: 0.55;
}

.ds-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 170, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 16px 34px rgba(0, 0, 0, 0.22);
}

.ds-tab.active {
  border-color: rgba(124, 156, 255, 0.42);
  background:
    radial-gradient(circle at top left, rgba(108, 126, 255, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(79, 108, 255, 0.24), rgba(122, 92, 255, 0.18));
  box-shadow:
    0 18px 40px rgba(54, 74, 180, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.ds-tab.active .ds-tab-title {
  color: #ffffff;
}

.ds-tab.active .ds-tab-copy {
  color: rgba(244, 247, 255, 0.84);
}

.ds-card {
  border-radius: 28px;
  padding: 20px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 34px rgba(0, 0, 0, 0.16);
}

.ds-card-title {
  letter-spacing: -0.02em;
}

.ds-card-copy {
  color: rgba(235, 242, 255, 0.74);
}

.ds-label {
  letter-spacing: 0.01em;
  color: rgba(240, 245, 255, 0.84);
}

.ds-input,
.ds-textarea {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.024));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.ds-input:hover,
.ds-textarea:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.028));
}

.ds-input:focus,
.ds-textarea:focus {
  border-color: rgba(120, 170, 255, 0.52);
  box-shadow:
    0 0 0 4px rgba(110, 168, 255, 0.14),
    0 10px 24px rgba(35, 58, 120, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.032));
}

.ds-output {
  border-radius: 20px;
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.018));
  border: 1px dashed rgba(255, 255, 255, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 12px 28px rgba(0, 0, 0, 0.12);
}

.ds-output.ds-empty {
  color: rgba(235, 242, 255, 0.6);
}

.ds-btn {
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.ds-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(130, 170, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 22px rgba(0, 0, 0, 0.18);
}

.ds-btn-primary {
  border-color: rgba(122, 156, 255, 0.3);
  background:
    linear-gradient(135deg, rgba(79, 108, 255, 0.34), rgba(122, 92, 255, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(63, 81, 190, 0.18);
}

.ds-btn-primary:hover {
  background:
    linear-gradient(135deg, rgba(79, 108, 255, 0.42), rgba(122, 92, 255, 0.3));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 30px rgba(63, 81, 190, 0.24);
}

.ds-chip-row {
  gap: 12px;
}

.ds-chip {
  border-radius: 999px;
  padding: 8px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

@media (max-width: 760px) {
  .ds-topbar {
    padding: 16px 14px 14px;
  }

  .ds-sidebar,
  .ds-content {
    padding: 14px;
  }

  .ds-card {
    padding: 16px;
    border-radius: 22px;
  }

  .ds-tab {
    padding: 16px 14px;
    border-radius: 20px;
  }
}

/* ==============================
   PHASE 3.7C — ACTIVE FOCUS POLISH (SAFE)
============================== */

/* Stronger active sidebar presence */
.ds-tab.active {
  position: relative;
  transform: translateY(-1px) scale(1.01);
}

/* Outer glow */
.ds-tab.active::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;

  box-shadow:
    0 0 0 1px rgba(120, 150, 255, 0.25),
    0 0 30px rgba(90, 120, 255, 0.25),
    0 12px 40px rgba(40, 60, 140, 0.25);
}

/* Slight dim for inactive tabs */
.ds-tab:not(.active) {
  opacity: 0.78;
}

/* Bring inactive back on hover */
.ds-tab:not(.active):hover {
  opacity: 1;
}

/* Smooth transitions for switching */
.ds-tab {
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

/* ==============================
   PHASE 3.7D — OUTPUT EXPERIENCE POLISH (SAFE)
   append-only block
   ============================== */

.ds-output-wrap {
  gap: 14px;
}

.ds-output-actions {
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}

.ds-output {
  position: relative;
  min-height: 170px;
  border-radius: 22px;
  padding: 18px 18px 20px;
  background:
    radial-gradient(circle at top left, rgba(95, 120, 255, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.018));
  border: 1px dashed rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.022),
    0 14px 30px rgba(0, 0, 0, 0.14);
  line-height: 1.62;
}

.ds-output::before {
  content: "Generated concept";
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(235, 242, 255, 0.78);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ds-output.ds-empty::before {
  content: "Awaiting generation";
  color: rgba(235, 242, 255, 0.66);
  background: rgba(255, 255, 255, 0.03);
}

.ds-output.ds-empty {
  color: rgba(235, 242, 255, 0.68);
}

.ds-output:not(.ds-empty) {
  color: rgba(244, 247, 255, 0.92);
}

.ds-output:not(.ds-empty) strong {
  color: #ffffff;
}

.ds-output-actions .ds-btn {
  min-height: 46px;
}

.ds-output-actions .ds-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .ds-output {
    min-height: 150px;
    padding: 16px;
    border-radius: 18px;
  }

  .ds-output::before {
    margin-bottom: 8px;
  }
}

/* ==============================
   PHASE 3.8A FIX — PANEL VISIBILITY SYNC (SAFE)
   append-only block
   ============================== */

.ds-panel {
  display: none !important;
}

.ds-panel.active {
  display: grid !important;
  gap: 16px;
}

/* ==============================
   PHASE 3.8B — MODE VISUAL DIFFERENTIATION (SAFE)
   append-only block
   ============================== */

/* Text Mode (clean, readable brief) */
.ds-output {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Visual Mode emphasis */
.ds-shell[data-ds-mode="visual"] .ds-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* subtle label feel */
.ds-output::before {
  content: "OUTPUT";
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.4;
  margin-bottom: 8px;
}

/* stronger visual mode label */
.ds-shell[data-ds-mode="visual"] .ds-output::before {
  content: "VISUAL LAYOUT PLAN";
  opacity: 0.6;
}

/* ==============================
   PHASE 3.8C — BACKGROUND BALANCE FIX (SAFE)
   append-only block
   ============================== */

/* soften overall shell glow */
.ds-shell {
  background:
    radial-gradient(circle at top, rgba(60, 80, 160, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(10, 14, 28, 0.95), rgba(8, 12, 24, 0.98));
}

/* reduce content wash */
.ds-content {
  background: transparent;
}

/* tone down cards so they pop individually */
.ds-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
}

/* make output area slightly darker for contrast */
.ds-output {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.35));
  border: 1px dashed rgba(255,255,255,0.12);
}

/* ==============================
   PHASE 3.8D — GLOBAL HOVER FIX (SAFE)
   append-only block
   ============================== */

/* STOP full-page hover glow */
.ds-shell:hover,
.ds-content:hover {
  background: inherit !important;
  box-shadow: none !important;
}

/* ensure only cards respond to hover */
.ds-card {
  transition: all 0.25s ease;
}

.ds-card:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow:
    0 10px 30px rgba(0,0,0,0.4),
    0 0 0 1px rgba(120,140,255,0.25);
}

/* buttons still feel alive */
.ds-btn:hover,
.ds-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
